From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,8ee4430d1820a774 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!newsgate.cistron.nl!xs4all!peer.news.zetnet.net!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: GNAT.Sockets: Timeval_Duration is in milliseconds? Date: Mon, 10 Dec 2007 20:06:53 +0000 Organization: Pushface Message-ID: References: <9d687056-c98b-405a-b166-afddac34f109@e67g2000hsc.googlegroups.com> <99906a58-2645-4880-bd13-9b63a30ffb59@e4g2000hsg.googlegroups.com> <8808f9fb-64a5-4a44-9684-dc0446a26bbc@b1g2000pra.googlegroups.com> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1197317214 13133 62.49.19.209 (10 Dec 2007 20:06:54 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Mon, 10 Dec 2007 20:06:54 +0000 (UTC) Cancel-Lock: sha1:ZfHBJw7qG8/TSc/61l5d1u/hs7I= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (darwin) Xref: g2news1.google.com comp.lang.ada:18865 Date: 2007-12-10T20:06:53+00:00 List-Id: gpriv@axonx.com writes: > I use GPS 4.1.3 (20070913), GNAT GPL 2007 (20070405-41) > > It may be good idea to fix windows version of GNAT though. GNAT 6.0.1 handles this program properly on Windows XP .. with Ada.Calendar; with Ada.Text_IO; use Ada.Text_IO; with GNAT.Sockets; procedure Socket_Times is Sel : GNAT.Sockets.Selector_Type; R, W : GNAT.Sockets.Socket_Set_Type; Stat : GNAT.Sockets.Selector_Status; Start, Finish : Ada.Calendar.Time; use type Ada.Calendar.Time; begin GNAT.Sockets.Initialize; GNAT.Sockets.Create_Selector (Sel); Put_Line ("starting.."); Start := Ada.Calendar.Clock; GNAT.Sockets.Check_Selector (Sel, R, W, Stat, 5.0); Finish := Ada.Calendar.Clock; Put_Line ("..done with " & Stat'Img & " after " & Duration'Image (Finish - Start)); end Socket_Times; (I don't have the output here, but it printed ..done with EXPIRED after 5.0001 or thereabouts, same as GPL 2006 on Mac OS X). Anyone care to try this on other Windows GNAT compiler releases?