comp.lang.ada
 help / color / mirror / Atom feed
From: rtcoslet@rockwellcollins.com (R. Tim Coslet)
Subject: Re: Fairly simple question about using time in Ada
Date: 4 Oct 2001 10:56:14 -0700
Date: 2001-10-04T17:56:15+00:00	[thread overview]
Message-ID: <cf2a9c38.0110040956.45ddd0d5@posting.google.com> (raw)
In-Reply-To: 3bb5234f$0$9274$afc38c87@news.optusnet.com.au

"Chris Vinall" <cjvinall@dingoblue.net.au> wrote in message news:<3bb5234f$0$9274$afc38c87@news.optusnet.com.au>...
> 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.
> 
> Thanks for any help
> 
> Chris

See D.8(7)

To correctly do time stamping you need the package Ada.Real_Time
The constant Tick gives the timing accuracy of your implementation of
this package.

You would call the function Clock to get the current Time for use in
generating your time stamps.


Please note that other posters have not differentatiated between the
accuracy of a number and the precision of a number. They are
different! What you need for good time stamps is accuracy (fidelity to
reality), not precision (number of bits or digits used to represent
the value).



  parent reply	other threads:[~2001-10-04 17:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-29  1:26 Fairly simple question about using time in Ada Chris Vinall
2001-09-29  2:33 ` James Rogers
2001-10-02  5:56   ` tmoran
2001-09-29 12:44 ` DuckE
2001-10-03 10:27   ` Petter Fryklund
2001-10-04 10:03 ` Alfred Hilscher
2001-10-04 17:56 ` R. Tim Coslet [this message]
2001-10-04 19:44   ` tmoran
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox