lkml.org 
[lkml]   [1999]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: Can't sleep less than 20 ms
From
> 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/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.040 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site