Guy, The actual kernel code is available at ftp://ftp.udel.edu/pub/ntp/software/nanokernel.tar.gz. The kernel clock reading routine insures that, even if the seconds portion of the in-kernel clock steps back, the clock reading is monotone definite increasing. While all kernels I have seen preserve this model, there could be some that don't understand it.
The API (ntp_adjtime() returns the clock state values in such a way that applications can know the leap is in progress and label the second accordingly. Note also the TAI offset is atomically updated as well. Guy Macon wrote: > Martin Burnicki wrote: > >>Guy Macon <http://www.guymacon.com/> wrote: >> >> >>>David L. Mills wrote: >>> >>> >>>>It is important that the leap be substantially complete by the end of >>>>the inserted second, which is done by stopping or almost stopping the >>>>clock for one second. >>> >>>I don't think that the above is correct. I believe that the clock >>>keeps running and counts off a 61st second. >>I'm pretty sure Dave Mills is correct. For an introduction of leap seconds >>and how they may be handled you migth have a look at >>http://www.meinberg.de/english/info/leap-second.htm#overview >> >>Search for "normalize" at the end of that section. > > > I see that. Key phrase: > "2 consequent seconds have the same time stamp" > > A post in the comp.protocols.time.ntp mailing list goes into > further detail: > > "every time a leap second happens, the fraction part > of the second, in the NTP timestamp keeps counting. That's > the fraction part only. It does not roll over to the next > second. Instead, the same second is repeated - thus we repeat > the same time, which means we go back in time. However, the > NTP timestamp sends out a leap second flag, which causes > your computer to go to the 61st second." > > http://mailgate.dada.net/comp/comp.protocols.time.ntp/msg08459.html > > It looks like we were both wrong. The NTP clock doesn't stop, as > David L. Mills wrote, nor does it continue into a 61st second, > which is what I thought it does. Instead it jumps back a second > and repeats the 60th second with a leap second flag set. > > _______________________________________________ questions mailing list [email protected] https://lists.ntp.isc.org/mailman/listinfo/questions
