Re: Can't sleep less than 20 ms

Bernd Paysan (bernd.paysan@gmx.de)
Thu, 8 Jul 1999 10:46:46 +0200 (MEST)


> Bernd Paysan wrote:
> > UTIME has the problem of a slipping clock.
>
> I recall on the x86 there's a way to avoid the slipping using just the
> timer chip, but I don't recall how off hand. Something about using
> another of the timer counters as a reference.

There are two possibilities: use the TSC on Pentium and above, and use the
RTC on lower end machines (just set up a RTC interrupt xxx times per second
(e.g. 128), and capture the timer to get a known offset).

It would have been much better if there was a free running timer with a
compare register (shoot when timer=reg), but we have to live with 20+ years
old timers in a brain-damaged design now.

-- 
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://www.jwdt.com/~paysan/

Sent through Global Message Exchange - http://www.gmx.net

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/