[ntp:questions] Google and leap seconds

Terje Mathisen "terje.mathisen at tmsw.no" at ntp.org
Wed Sep 21 08:09:02 UTC 2011


Marco Marongiu wrote:
> Il 21/09/2011 09:26, Marco Marongiu ha scritto:
>> Wouldn't it be convenient for ntpd to have
>> an option, so that users may refuse to step back the clock in case of a
>> leap second, and adjust the clock speed instead?
>
> PS: I'd like to clarify I am not thinking about something like the
> tinker directive. Rather, I am thinking about something like the
> following (when said option is set):
>
> - upstream signals a leap second insertion/deletion
>
> - after 23:59:59, ntpd consciously does NOT insert the leap second and
> suspends step adjustments for a convenient amount of time (T seconds)
>
> - for T seconds, ntpd tries to slow down / speed up the clock to make up
> for the leap second
>
> - if, after T seconds, the normal behaviour is restored. If the offset
> is still too big, a step change will be forced.

This is what Google does, except for two tweaks:

1) The adjustment happens _before_ midnight, i.e. the clocks are correct 
at the end of leap second insertion.

2) Their adjustment function is maximally smooth at both ends, i.e. no 
steps in either phase or frequency.

Terje
-- 
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"




More information about the questions mailing list