hi res timer

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View


In linux 2.6 kernel the clock_getRes says that it is 1ms accuracy. 20%

I basically want to have a method run every 1 ms.  However when I run it =
on linux 2.6 kernel fedora core 2  i don't get that and I get a lot of =

We have tried running it as root and used top to renice it to a high =

What are we doing wrong? 20%
Can someone point me to an example chuck of code that shows a hi-res =
timer at over 100 hz.

thanks in advance

Re: hi res timer
Quoted text here. Click to load it

Linux is not a hard realtime system, so you will find a jitter of _any_
size if you wait long enough and produce enough stress in the system.

If you want reliable timing you need to add something like RTAI.


Re: hi res timer
Quoted text here. Click to load it

Which 2.6 kernel, there are several of them :) Is it saying "accuracy"
or is it saying "precision?"

Quoted text here. Click to load it

What do you get and what is your definition of "a lot" of jitter?
What would be acceptable jitter for your situation?

Quoted text here. Click to load it

I seem to recall that there can be three values for HZ now in a
2.6.mumble kernel (maybe that cam in .14?)  100, 250 and 1000 I wonder
if running HZ at 1000 and perhaps playing with timeslices and such
might get things going "well enough" without having to go all the way
to what I think is RTAI?

rick jones
firebug n, the idiot who tosses a lit cigarette out his car window
these opinions are mine, all mine; HP might not want them anyway... :)
We've slightly trimmed the long signature. Click to see the full one.
Re: hi res timer
Quoted text here. Click to load it
I was playing with .14 recently and saw it there.  I'm not sure if it
came any earlier, though.
echo snipped-for-privacy@pwlvkqrw.nwv|tr zwvq aeto

Re: hi res timer
 > I wonder
Quoted text here. Click to load it

If you don't mind that _sometimes_ the timing condition is not met, you
are fine (2.6 is said to be a better _soft_realtime_ system than
previous versions). But there is no guarantee.


Site Timeline