[lug] High resolution timers
Jeffrey Siegal
jbs at quiotix.com
Fri Feb 21 22:56:10 MST 2003
D. Stimits wrote:
> average system. I gettimeofday() actually useful as a microsecond
> resolution clock on non-RT x86 linux?
In short, yes.
> Even the earlier mentioned URL
> talks about how the scheduler itself can cause a 10 ms error simply by
> scheduling something else temporarily.
Of course it can. You can't expect real time behavior with a non-real
time scheduler. That's an issue of the scheduler, not gettimeofday. If
you use SCHED_FIFO or SCHED_RR, you won't have to be converned deal with
the scheduler. There are still other uncontrolled interruptions that
can occur on a non-RT operating system, but again, that's an issue of
the OS, not gettimeofday. You would have exactly the same problems with
a program running on such an OS reading a hardware timer.
More information about the LUG
mailing list