From: "David C. Hoos, Sr." <david.c.hoos.sr@ada95.com>
Subject: Re: Simple Real_Time.Time_Span question
Date: 1998/10/13
Date: 1998-10-13T00:00:00+00:00 [thread overview]
Message-ID: <7003e4$534@hacgate2.hac.com> (raw)
In-Reply-To: 6vvsgo$rvo$1@nnrp1.dejanews.com
dennison@telepath.com wrote in message <6vvsgo$rvo$1@nnrp1.dejanews.com>...
>I need to convert values of Ada.Real_Time.Time_Span into floating point
>values for use in time-based simulation calculations. I'd think there *has*
>to be a way to do this, but I don't see one. All I see is the ability to do
>it indirectly via a conversion to Duration. But that looses the extra
>accuracy of Time_Span, which was the whole point of using it in the first
>place.
>
>Am I missing something?
Yes, a couple of things, anyway, viz.:
1. I think you're talking about precision and not accuracy.
2. Since the types involved are defined in the RM as
implementation-dependent, it is implementation-dependent whether there is
any loss of precision going from Ada.Real_Time.Time_Span to Duration. In
the case of the GNAT compiler, these both have resolution (precision) of one
nanosecond. In fact, the specification for Ada.Real_Time.Time_Span in GNAT
is new Duration. What other compilers may do is ....??
next prev parent reply other threads:[~1998-10-13 0:00 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-10-13 0:00 Simple Real_Time.Time_Span question dennison
1998-10-13 0:00 ` David C. Hoos, Sr. [this message]
1998-10-13 0:00 ` dennison
1998-10-14 0:00 ` Robert I. Eachus
1998-10-14 0:00 ` Keith Thompson
1998-10-14 0:00 ` Jonathan Guthrie
1998-10-15 0:00 ` dennison
1998-10-16 0:00 ` Tucker Taft
1998-10-16 0:00 ` dennison
1998-10-16 0:00 ` dewar
1998-10-17 0:00 ` Niklas Holsti
1998-10-14 0:00 ` Niklas Holsti
1998-10-14 0:00 ` Niklas Holsti
1998-10-13 0:00 ` dennison
1998-10-13 0:00 ` Tucker Taft
1998-10-14 0:00 ` dewar
1998-10-14 0:00 ` dennison
1998-10-14 0:00 ` Matthew Heaney
1998-10-14 0:00 ` Robert I. Eachus
1998-10-15 0:00 ` dennison
1998-10-16 0:00 ` Robert I. Eachus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox