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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,51aec3e725649fde X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-04 03:03:29 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!194.213.69.151!news.algonet.se!algonet!f.de.uu.net!lnewspeer01.lnd.ops.eu.uu.net!emea.uu.net!newsfeed.siemens.de!news.mch.sbs.de!not-for-mail From: Alfred Hilscher Newsgroups: comp.lang.ada Subject: Re: Fairly simple question about using time in Ada Date: Thu, 04 Oct 2001 12:03:22 +0200 Organization: Siemens AG Message-ID: <3BBC33EA.8CD5CC50@icn.siemens.de> References: <3bb5234f$0$9274$afc38c87@news.optusnet.com.au> NNTP-Posting-Host: 139.21.122.158 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.5 [en] (WinNT; I) X-Accept-Language: en Xref: archiver1.google.com comp.lang.ada:13711 Date: 2001-10-04T12:03:22+02:00 List-Id: Chris Vinall wrote: > > I'm writing a program in which I need to be able to timestamp events and > then later check how much real time has elapsed since that event occurred. > It is essential that this timing operate to tenths of a second and > hundredths of a second would be a lot better. > > How do I go about doing this in Ada? My textbook mentioned something about > Duration but was less than helpful. Hi, I did some tests with the "Calendar" package sometime ago. I found, that while GNAT (on WinNT) has a pretty good accurcy, the ObjectAda that I have (the free version), has a worse resolution. So I use some OS-calls now. If you work on Windows, you can get the code from me.