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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,31d67020d4b04d5b X-Google-Attributes: gid103376,public From: dewar@gnat.com Subject: Re: Simple Real_Time.Time_Span question Date: 1998/10/14 Message-ID: <700usk$cht$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 400809060 References: <6vvsgo$rvo$1@nnrp1.dejanews.com> X-Http-Proxy: 1.0 x13.dejanews.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Wed Oct 14 01:30:59 1998 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/2.02 (OS/2; I) Date: 1998-10-14T00:00:00+00:00 List-Id: In article <6vvsgo$rvo$1@nnrp1.dejanews.com>, dennison@telepath.com wrote: > 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? It is odd for a compiler not to choose a sufficient precision for Duration to accurately represent a Time_Span value. Certainly in the case of GNAT, Duration is represented in nanoseconds, and you will not lose any precision following the conversion path you suggest. Robert Dewar Ada Core Technologies -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own