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!news4.google.com!news.glorb.com!newsfeed.stueberl.de!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: 23 Apr 2005 06:39:20 +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 1114234881 27580 62.49.19.209 (23 Apr 2005 05:41:21 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Sat, 23 Apr 2005 05:41:21 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Xref: g2news1.google.com comp.lang.ada:10645 Date: 2005-04-23T06:39:20+01:00 List-Id: "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). 1s VxWorks/Cert taprop uses tickGet. 56 LynxOS taprop uses clock_gettime. 5a DEC Unix taprop uses clock_gettime. 5f IRIX pthread taprop uses clock_gettime. 5g IRIX athread taprop uses gettimeofday. 5h HP-UX DCE taprop uses clock_gettime. 5i GNU/LinuxThreads taprop uses getttimeofday. 5n Non-tasking taprop returns 0.0. 5o OS/2 taprop uses osprim which is the same as its Clock which is its system clock. 5p OpenNT, Dec Unix, SCO taprop use osprim which is the same as its Clock which uses gettimeofday. 5s Solaris taprop uses osprim which is the same as its Clock which uses gettimeofday. 5v OpenVMS/Alpha taprop uses osprim which is the same as its clock which uses the system clock. 5w NT taprop uses osprim which uses the performance counter. 5z VxWorks taprop uses clock_gettime. 7s 'POSIX-like' taprop uses clock_gettime. -- Simon Wright 100% Ada, no bugs.