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: Niklas Holsti Subject: Re: Simple Real_Time.Time_Span question Date: 1998/10/14 Message-ID: <36250C6B.FA91AB64@icon.fi>#1/1 X-Deja-AN: 401121574 Content-Transfer-Encoding: 7bit References: <6vvsgo$rvo$1@nnrp1.dejanews.com> <7003e4$534@hacgate2.hac.com> <700ic6$q1p$1@nnrp1.dejanews.com> <3624E1DC.B083F43A@icon.fi> Content-Type: text/plain; charset=us-ascii Organization: Space Systems Finland Ltd Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1998-10-14T00:00:00+00:00 List-Id: To correct a typo of mine: I wrote: > > 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. > > [ snip ] > > > > Thus a package billed as "Real_Time" ought to provide a portable way to get > > a floating point value of a delta time (time_span). Where is it? > > How about taking your Time_Span value, dividing it with Time_Span_Unit > to get an integer, then multiplying with Time_Span to get a real number? ********* should be Time_Unit > The items Time_Span_Unit, "/" and Time_Span are defined in ********* should be Time_Unit > Ada.Real_Time. > > I haven't tried it, but the LRM seems clear on this. > > Niklas Holsti