1998-09-09 03:51:10

by H. Peter Anvin

[permalink] [raw]
Subject: Re: GPS Leap Second Scheduled!

Followup to: <98090822315400.00819@soda>
By author: Andrej Presern <[email protected]>
In newsgroup: linux.dev.kernel
>
> Have you considered simply not scheduling any processes for one second and
> adjusting the time accordingly? (if one second chunk is too big, you can do it
> in several steps)
>
> Andrej
>

The way xntp deals with leap seconds is it lets the epoch
float... i.e. it holds time_t to the same value for two seconds. One
proposal (which I like) was to compensate for this by allowing the
microsecond or nanosecond fields or struct timeval & co to advance to
1,999,999 ?s or 1,999,999,999 ns in the case of such events. The neat
thing is that the latter number fits very nicely in a 32-bit integer
even if someone (mis-) interprets it as signed.

-hpa

--
PGP: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD 1E DF FE 69 EE 35 BD 74
See http://www.zytor.com/~hpa/ for web page and full PGP public key
I am Bah?'? -- ask me about it or see http://www.bahai.org/
"To love another person is to see the face of God." -- Les Mis?rables


1998-09-09 07:35:22

by Chris Wedgwood

[permalink] [raw]
Subject: Re: GPS Leap Second Scheduled!

On Wed, Sep 09, 1998 at 12:59:47AM +0000, H. Peter Anvin wrote:

> The way xntp deals with leap seconds is it lets the epoch float...
> i.e. it holds time_t to the same value for two seconds.

Cool... so 1970 becomes even longer ago that I would have assumed
then?



-cw