[LEAPSECS] Coming of age in the solar system
Michael Sokolov
msokolov at ivan.Harhan.ORG
Sun Sep 5 13:53:12 EDT 2010
Tony Finch <dot at dotat.at> wrote:
> This reminds me of 2008-12-31 23:59:60 Z when a lot of Oracle systems
> crashed or rebooted because the Solaris clock went backwards.
That's Solaris' fault then. It wouldn't happen under 4.3BSD-Quasijarus,
because I don't allow the clock to go backward or to stop altogether, it
only adjusts its ticking rate by +/- 10% or so to discipline itself to
the external reference. Note the reference I'm using *can* do bad
things like stopping or going backward (that's what happens when I use
the present-day leaping UTC as the reference), but my ttsd (trivial time
synchronization daemon) is the only thing that has direct access to this
external reference, and it shields the rest of the system from its
badness.
My ttsd is as trivial as this (C pseudocode):
while (1) {
gettimeofday(&systime);
exttime = read_external_reference();
adjtime(exttime - systime);
sleep(3600);
// The duration of this ~1h sleep is measured by the system clock
// that's being slewed,
// but its exactness or inexactness is totally inconsequential.
}
Folks, this is ALL it takes to have a trouble-free internal time scale
in the presence of leap seconds!
MS
More information about the LEAPSECS
mailing list