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 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!postnews.google.com!e6g2000prf.googlegroups.com!not-for-mail From: gpriv@axonx.com Newsgroups: comp.lang.ada Subject: Re: GNAT.Sockets: Timeval_Duration is in milliseconds? Date: Mon, 10 Dec 2007 13:02:11 -0800 (PST) Organization: http://groups.google.com Message-ID: <8934100e-0576-4078-8e15-cc4aa942af3f@e6g2000prf.googlegroups.com> 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: 151.196.71.114 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1197320531 6599 127.0.0.1 (10 Dec 2007 21:02:11 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 10 Dec 2007 21:02:11 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e6g2000prf.googlegroups.com; posting-host=151.196.71.114; posting-account=YaY8rAoAAAAAnFXOECY3BGVJsrvFJCgy User-Agent: G2/1.0 X-HTTP-Via: 1.1 SPARKS X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:18867 Date: 2007-12-10T13:02:11-08:00 List-Id: On Dec 10, 3:06 pm, Simon Wright wrote: > gp...@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? Yep, it worked: ..done with EXPIRED after 4.999302724