Re: [chrony-dev] Chrony "Watchdog" |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
On Fri, Jun 10, 2011 at 09:55:59AM +0200, Harald Krammer wrote:
> Hello *,
> my tests are nearly completed with 1.25. One thing I have noted.
> If a time jump will happen into the past (done by settimeofday)
> then Chrony does not update the information's anymore.
> The leap in time happens by a software fault in my application.
> I fixed that, but I have an uneasy feeling. It is clear to me
> that a time-jump is a sensitive subject.
chrony currently doesn't handle external jumps in system time. On
a large forward jump all timers will fire at once, that's not that
bad, but on a backward jump all timer activity will stop until the
clock is back at the time they were originally scheduled.
> Currently I uses the 'System time' from command tracking to find
> out the current offset. That isn't enough. A watchdog
> functionality may be helpful. What do you think?
You mean something using alarm()? What exactly would it do to recover
from the backward jump?
One of the items in my todo list is to rework the timer facility to be
able to use the CLOCK_MONOTONIC clock. That should solve the problem
with external jumps nicely.
In the meantime I think it should be good enough to compare timestamp
captured after every select() call with the previous one and if the
difference is negative, adjust all timers by that amount. I'll look
into it.
--
Miroslav Lichvar
---
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.