Path: utzoo!attcan!telly!ziebmef!mcp From: mcp@ziebmef.uucp (Marc Plumb) Newsgroups: comp.sys.amiga.tech Subject: Re: Timer question Message-ID: <1988Dec31.195738.1518@ziebmef.uucp> Date: 1 Jan 89 00:57:37 GMT References: <427@tekn01.chalmers.se> <3210@amiga.UUCP> <3137@sugar.uu.net> <5584@cbmvax.UUCP> Reply-To: mcp@ziebmef.UUCP (Colin Plumb) Organization: Ziebmef Public Access Unix, Toronto, Ontario Lines: 21 Just to throw in an idea, I'd like to mention that the way the Inmos transputer handles its on-chip timer is quite elegant: There is a current time, which I'll call "now". When you do something like a Delay(), you actually wait for a time. There are, in fact, two timers, one of which runs at 1 MHz and one of which runs at 1/64 that rate. Even the faster one can fit enough range into 32 bits (4096 seconds is over an hour) for most purposes. If you wait for a time which is between now-0x7fffffff and now, you don't wait at all; your time has passed already, and the call returns immediately. If you wait for a time from now+1 to now+0x80000000, you are put in the queue of sleeping processes and awoken when your time rolls around. Combined with a way to get the current time, this provides all the functionality most people want. There's no ned to fudge to be woken up every n microseconds. -- -Colin