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!news2.google.com!news.glorb.com!peer1.news.newnet.co.uk!194.159.246.34.MISMATCH!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: Sat, 08 Dec 2007 22:11:49 +0000 Organization: Pushface Message-ID: References: <9d687056-c98b-405a-b166-afddac34f109@e67g2000hsc.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 1197151909 12625 62.49.19.209 (8 Dec 2007 22:11:49 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Sat, 8 Dec 2007 22:11:49 +0000 (UTC) Cancel-Lock: sha1:JxixhSSo5VtCqpfkQt2HQUwPgBs= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (darwin) Xref: g2news1.google.com comp.lang.ada:18792 Date: 2007-12-08T22:11:49+00:00 List-Id: gpriv@axonx.com writes: > I find it somewhat misleading that Timeout values use different scale > than Ada duration while share that type (not Ada way). Is there a > purpose in that (other than direct translation in socket library). It > does cost some headache to figure that out and it would be more > appropriate in Ada style to make a new type for timeouts or scale it > back to seconds. Anyone would agree? GNAT GPL 2006[1] agrees with you! from GNAT.Sockets, -- Timeval_Duration is a subtype of Standard.Duration because the full -- range of Standard.Duration cannot be represented in the equivalent C -- structure. Moreover, negative values are not allowed to avoid system -- incompatibilities. Immediate : constant := 0.0; Forever : constant := Duration (Integer'Last) * 1.0; subtype Timeval_Duration is Duration range Immediate .. Forever; [1] No GNAT GPL 2007 for Mac OS X :-(