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.7 required=5.0 tests=BAYES_00,MSGID_RANDY 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-29 07:08:38 PST Path: supernews.google.com!sn-xit-03!supernews.com!news-out.usenetserver.com!news-out.usenetserver.com!feed2.onemain.com!feed1.onemain.com!xfer13.netnews.com!netnews.com!news.maxwell.syr.edu!nntp2.deja.com!nnrp1.deja.com!not-for-mail From: Ted Dennison Newsgroups: comp.lang.ada Subject: Re: Duration vs. Ada.Real_Time Date: Mon, 29 Jan 2001 14:54:31 GMT Organization: Deja.com Message-ID: <954074$qpq$1@nnrp1.deja.com> References: <980495512.529981@edh3> <3A71814B.7E8CCF60@acm.org> <94s5bl$r1r$1@nnrp1.deja.com> <3A71E4F6.6D7015AD@acm.org> <94sqch$fls$1@nnrp1.deja.com> <3A72DC5E.4C1CE092@acm.org> NNTP-Posting-Host: 204.48.27.130 X-Article-Creation-Date: Mon Jan 29 14:54:31 2001 GMT X-Http-User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; 0.7) Gecko/20010109 X-Http-Proxy: 1.0 x73.deja.com:80 (Squid/1.1.22) for client 204.48.27.130 X-MyDeja-Info: XMYDJUIDtedennison Xref: supernews.google.com comp.lang.ada:4654 Date: 2001-01-29T14:54:31+00:00 List-Id: In article <3A72DC5E.4C1CE092@acm.org>, Marin David Condic wrote: > O.K. Pick nits. :-) I meant "frequency" but this is in a way related > to "accuracy". If my micrometer is marked off in thousanths of an > inch, it does me no good to try to measure ten-thousanths of an inch, > so in manufacturing parts, I can't be any more accurate than to a > thousanth of an inch. My micrometer may have been bounced off the > milling machine a few times too many and may actually not be > "accurate" in measuring a 1" dimension. Hmmm. Now it sounds like you are talking about frequency vs. "resolution". :-) When you say "accuracy", I think of things like clock drift. I'm currently dealing with networked realtime systems. Thus I've had problems associated with both the clock frequenceies and with the clock accuracy (clock drift between two machines that are trying to operate in lock-step). > Well, you do want some precision beyond the smallest unit of the > actual clock time if you have this sort of situation. But most of the > clocks I've seen are some version of a scaled integer, thus allowing > Duration'Small to be whatever it wants to be as long as the LSB is > under 20mSec. Am I incorrect in this? GreenHills on vxWorks (x86 at least) uses a record type. The units of the smallest field are in microseconds. Thus if the frequency divides evenly into micros, you're OK. However, I don't see how an Ada vendor could arrive at a good number ahead of time. Your best bet is probably to just use some ridiculously high resolution like Green Hills did. The frequency on vxWorks is something that can be changed by programs on the fly. Our (Ada) system reads the requested frequency from a configuration file and sets it at startup. The default frequency is 60Hz. We have one system that uses the default, one that sets it at 240Hz, and one that sets it at 1,000Hz. With PC's getting faster all the time, I wouldn't be shocked to see folks wanting to use multiple KHz. Microseconds might even be too coarse by the end of the decade! -- T.E.D. http://www.telepath.com/~dennison/Ted/TED.html Sent via Deja.com http://www.deja.com/