Skip to contentSkip to conversation

Is CLOCK_REALTIME the same as the clock under gettimeofday()

DISCUSSION george anzinger 1 participant 1 message Apr 3, 2002 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 014701c1db2b$d1f537f0$820314ac@fdvlegoll01

#1 lore raw
Quoted 4 lines · Vincent Legoll

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.

Quoted 11 lines

Did I misread you ? (my english is not omnipotent)
---------------------------------------------------------------------------
-----
From: george anzinger ([email protected])
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.

Signature · 4 lines
George Anzinger   [email protected]
High-res-timers:  http://sourceforge.net/projects/high-res-timers/
Real time sched:  http://sourceforge.net/projects/rtsched/
Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml