Messages in this thread | | | Date | Fri, 8 Aug 1997 13:16:54 +0200 (MET DST) | From | Ingo Molnar <> | Subject | Re: 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
| |