[Coco] OS9 NITROS9 Accurate timer/clock
Gene Heskett
gheskett at shentel.net
Wed May 29 13:20:20 EDT 2019
On Wednesday 29 May 2019 09:53:06 am Walter Zambotti wrote:
> I'm looking for a os9 call that can return a better timer resolution
> than 1 second.
>
There isn't, and the 'tick' could be added to the gettime call I suppose
but even that would only give 100 millisecond accuracy with the software
clock. Some of the other hardware clocks might get better than that,
but getting into the clock chip to read it would start to take up cpu
cycles it does not have to spare.
> There doesn't seem to be one!
if you add the ticks to gettime, then you could fine tune it to wake uo
on the exact tick that starts a second and d0 that to a tick max error.
Thats a technique Jim and I used when we wrote ezcron for the amiga's at
the tv station, and published it on aminet at the time, as the amigados
had no cron of any kind. That worked by ending a given seconds work
calls by getting the current time including ticks and multiplying it by
the ticks that actually existed between now and the next scheduled
wakeup, and it then always woke up at a given 1st tick
of that second. I think I used a similar bit of code in the cron you can
get from my web site. You may want to take a look at it.
> Walter
>
> Sent from my Xperia by Sony smartphone
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
More information about the Coco
mailing list