[LEAPSECS] A standard for leap second smearing

Martin Burnicki martin.burnicki at burnicki.net
Wed Sep 28 07:35:48 EDT 2016


Tony Finch wrote:
> Steve Summit <scs+ls at eskimo.com> wrote:
>>
>> I think there are aspects of the implementation of any smearing
>> that are maybe being glossed over.  I think it's important to
>> distinguish pretty carefully between three distinct "clocks",
>> or views of time:
>> 1. The time exchanged between machines by a protocol such as NTP.
>> 2. The time kept by an OS kernel (which is typically based on
>>    oscillators that are disciplined by (1).)
>> 3. The time returned to user-mode programs by system calls such
>>    as gettimeofday.
>>
>> There seems to be a presumption in several comments in this
>> thread that (3) is necessarily identical to (2), but I think
>> that's a bad idea.
> 
> You are completely right up to here, but it's probably unwise to dictate
> how (which part(s) of the system) leap second smear is implemented.

I think in general we need to distinguish if

- smearing is done by a server, so that it hides the leap second from
all its clients, and the clients don't even become aware of the leap second

- smearing is done by a client, which receives a leap second warning and
thus is aware of an upcoming leap second, and can either slew its own
system time over the leap second (that's what ntpd for Windows does) or
let the OS kernel handle the leap second (stepping the system time back
by 1s by default) and just hide this to the user level.

The latter is what UTC-SLS does, IIRC.

Please see also
http://bugs.ntp.org/show_bug.cgi?id=2855#c6

Martin



More information about the LEAPSECS mailing list