[lkml]   [2002]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Is CLOCK_REALTIME the same as the clock under gettimeofday()
Vincent Legoll wrote:
> After reading that message from you on lkml archive, I asked me a question:
> How would you know you have drifted more than one second, if timer expires
> after a very long time ? It'll be too late...

You are right. I am still trying to figure out a sane way to do this.
I suppose we could check from time to time to see what the drift is and
redo all the nanosleep abs timers if it ever drifts more than some
value. We have to redo them when there is a gross clock set anyway, so
we do need to know how to do this.
> Did I misread you ? (my english is not omnipotent)
> ---------------------------------------------------------------------------
> -----
> From: george anzinger (
> Date: Wed Mar 27 2002 - 15:50:43 EST
> Another solution to this issue is to program the clock_nanosleep() calls
> to wake up a second or so prior to the requested time and then fine tune
> the wake up to happen as close as possible to the requested time. This
> calculation might take into account the current ntp drift rate.

George Anzinger
Real time sched:
Preemption patch:
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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