lkml.org 
[lkml]   [1997]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: About the timer in linux-kernel
On Fri, 8 Aug 1997, Benoit ROBINET wrote:

> I would like to implement timers that allow to go to sleep for a shorter
> time than a hundredth of second (which is the unit of jiffies).
> I know I could use udelay() function, but I must say that I don't really
> want to, because I think udelay() blocks the whole kernel when
> working...
> I am highly frustrated because I have a Pentium Pro 200, and I don't
> really see how to be more accurate than hundredth of seconds...
> Could anyone help me ?

redefine HZ to 1000 in param.h, and there you go 1 millisec sleeping
interval. I've used a P5-100MHz once with HZ==10000, so there is alot of
space. Generally, the timer interrupt takes ~5-10 usecs, so 1000 should be
absolutely safe on your box.

also, there is a custom patch around, that tweaks the PC timer chip to get
microsecond accurate (optional) timers.

-- mingo



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