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,d1f23f0bd3971bec X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!feed.news.tiscali.de!newsfeed.vmunix.org!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: Timing Block of GNAT code in milliseconds Date: 24 Apr 2005 19:57:24 +0100 Organization: Pushface Sender: simon@smaug.pushface.org Message-ID: References: <1114090119.383842.20950@l41g2000cwc.googlegroups.com> <1KydnfadqcK30fXfRVn-qw@comcast.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 1114369165 13946 62.49.19.209 (24 Apr 2005 18:59:25 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Sun, 24 Apr 2005 18:59:25 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Xref: g2news1.google.com comp.lang.ada:10671 Date: 2005-04-24T19:57:24+01:00 List-Id: "Steve" writes: > "Simon Wright" wrote in message > news:x7vsm1i2gs7.fsf@smaug.pushface.org... > > "Steve" writes: > > > >> I tend to think of the Real_Time package as the one to use when > >> you are timing events and the Calendar package as the one to use > >> when you don't care about precise timing and want the time of day > >> for reporting, etc. > > > > It used to be the case with GNAT that there was an amazing > > similarity between these two clocks! Looking on 5.02a1, on a first > > glance it seems that Real_Time is derived as follows (the first > > two letters are the encoding in the distribution, eg if building > > on NT the file s-taprop.adb is copied from 5wtaprop.adb). > > > [snip] > > It would also be interesting to know whether there is a difference > in the time base for Ada.Calendar and Ada.Real_Time for the > different systems. There are two things, the tick rate and the epoch. All the ones that use the system clock or gettimeofday or clock_gettime are going to have identical Calendar and Real_Time (and, incidentally, fail to meet the ARM requirement in D.8(32), "There shall be no backward clock jumps.", if the system's time-of-day changes; the only one that obviously meets that is VxWorks/Cert). I don't know about Windows NT. -- Simon Wright 100% Ada, no bugs.