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.5 required=5.0 tests=BAYES_00,MSGID_RANDY, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,8c3f76cf9b2829c4 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-01-26 07:40:13 PST Path: supernews.google.com!sn-xit-02!sn-xit-01!supernews.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!newsswitch.lcs.mit.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!news.gtei.net!nntp2.deja.com!nnrp1.deja.com!not-for-mail From: Robert Dewar Newsgroups: comp.lang.ada Subject: Re: Duration vs. Ada.Real_Time Date: Fri, 26 Jan 2001 15:33:09 GMT Organization: Deja.com Message-ID: <94s5bl$r1r$1@nnrp1.deja.com> References: <980495512.529981@edh3> <3A71814B.7E8CCF60@acm.org> NNTP-Posting-Host: 205.232.38.14 X-Article-Creation-Date: Fri Jan 26 15:33:09 2001 GMT X-Http-User-Agent: Mozilla/4.61 [en] (OS/2; U) X-Http-Proxy: 1.0 x51.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 X-MyDeja-Info: XMYDJUIDrobert_dewar Xref: supernews.google.com comp.lang.ada:4554 Date: 2001-01-26T15:33:09+00:00 List-Id: In article <3A71814B.7E8CCF60@acm.org>, Marin David Condic wrote: > So if you are concerned about portability, you'd use Duration > only in applications where 20mSec of accuracy is sufficient. This may be confusing, the question was not about precision of Duration, it was about resolution of the timer The value of Duration'Small is only an upper bound for resolution, there is nothing in the RM that forbids an implementation where clock only updates every second (and indeed do not be surprised if some Unix implementations are like this). For portability, your use > of Real_Time should never assume accuracy greater that 20uSec. If you don't > need portability, then you can rely on whatever the implementation gives you > for Duration'Small etc. > > MDC > > Atle R�stad wrote: > > > Hi > > > > I have some code that has a max of 30 milliseconds to process, and need to > > measure if this is possible. But the requirement for Duration is that > > Duration'Small must be less then 20 milliseconds, and > > Ada.Real_Time.Time_Unit must be less then 20 microseconds. > > > > I figured that using Duration could give imprecise result. So I wrote a > > small program to print out Duration'Small. > > > > I'm using gnat 3.12 and printed out both Duration'Small and > > Real_Time.Time_Unit and they were both 1.0E-09. I thought Duration'Small > > would be larger then Real_Time.Time_Unit but they were the same. > > > > Why should I use Real_Time when duration has the same resolution? > > > > I will run the program on an Solaris 8. How will this affect my time > > measuring? What resolution can I expect? > > > > Thanks, > > Atle > > -- > =============================================================== ======= > Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/ > Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m > Visit my web site at: http://www.mcondic.com/ > > "I'd trade it all for just a little more" > -- Charles Montgomery Burns, [4F10] > =============================================================== ======= > > Sent via Deja.com http://www.deja.com/