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,d3c9f386a8038d3c X-Google-Attributes: gid103376,public From: "Robert I. Eachus" Subject: Re: Timers in application (again) Date: 2000/07/12 Message-ID: <396C8E7C.A47445BA@earthlink.net>#1/1 X-Deja-AN: 645508478 Content-Transfer-Encoding: 7bit References: <962353369.632238@edh3> <8ji8i7$7l5$1@nnrp1.deja.com> <962628027.67730@edh3> <3962B30F.969E7188@telepath.com> <3963D186.DD987838@earthlink.net> <3965DFB2.48371EAA@earthlink.net> X-Accept-Language: en,pdf Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 963415467 63.24.57.173 (Wed, 12 Jul 2000 08:24:27 PDT) Organization: The MITRE Corporation MIME-Version: 1.0 NNTP-Posting-Date: Wed, 12 Jul 2000 08:24:27 PDT Newsgroups: comp.lang.ada Date: 2000-07-12T00:00:00+00:00 List-Id: Simon Wright wrote: > Looking at the Linux code (kernel/sched.c, function sys_nanosleep()) > it is very hard to see how the effect you describe could possibly be > achieved, except perhaps with a busy wait -- indeed, Linux does just > that for RT nanosleeps of <= 2mS, a behaviour I don't think we want to > retain! One of the nicest features of Linux is that you can substitute a working clock, assuming that the hardware has one you can get to, and you are all set. One nice thing about the Amiga is that you get an interrupt at the beginning of every scan line on the display. But even this only allowed hard scheduling on a granularity of tens of microseconds. Outside of Amigas, most modern hardware will give you a clock interrupt about every millisecond at best. (One 1024th of a second is pretty common.)