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=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8c3f76cf9b2829c4 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-01-31 13:47:50 PST Path: supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!news-out.usenetserver.com!news-out.usenetserver.com!newsfeed.direct.ca!look.ca!newsfeed1.earthlink.net!newsfeed2.earthlink.net!newsfeed.earthlink.net!news.mindspring.net!not-for-mail From: Marin David Condic Newsgroups: comp.lang.ada Subject: Re: Duration vs. Ada.Real_Time Date: Wed, 31 Jan 2001 16:47:14 -0500 Organization: MindSpring Enterprises Message-ID: <3A7887E2.49CF12C5@acm.org> References: <980495512.529981@edh3> <3A71814B.7E8CCF60@acm.org> <94s5bl$r1r$1@nnrp1.deja.com> <3A71E4F6.6D7015AD@acm.org> <94vo82$kst$1@nnrp1.deja.com> <959d0c$gsg$1@nnrp1.deja.com> <3A786497.1C791722@acm.org> <959u02$1o0$1@nnrp1.deja.com> NNTP-Posting-Host: d1.56.ba.fb Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Server-Date: 31 Jan 2001 21:46:55 GMT X-Mailer: Mozilla 4.07 [en] (WinNT; I) Xref: supernews.google.com comp.lang.ada:4787 Date: 2001-01-31T21:46:55+00:00 List-Id: Ted Dennison wrote: > Is there some RTC hardware out there that uses seconds instead of Hz as > its units? If so, and if its OS rescheduling primitive kept the same > units, then yes, the Ada vendor for that platform should also use those > same units. Well, even if its hz, that doesn't mean Duration'Small can't have that value. Let's say that the clock goes at 1000hz - Each tick is 1/1000 of a second, correct? (1hz = 1 cycle/sec - unless senility is setting in? :-) Duration'Small is 0.001. If the clock is at 1024hz then each tick is 1/1024 of a second. Duration'Small is 0.0009765625. (somewhere you have a declaration: "for Duration'Small use 0.0009765625 ;" - change the target? - change this statement in the compiler and off you go.) All you're saying is that the LSB of Duration has some quantum value which is measured in units of seconds. As long as this falls under 0.020, its within the requirements of the Ada standard and Duration coincides nicely with your available clock. Now if your clock gives you an IEEE 80 bit floating point value, the story has to change. I've just never seen one of those. MDC -- ====================================================================== 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] ======================================================================