Re: Unix Time and Leap Seconds
- From: William Ahern <william@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 25 Jun 2007 11:34:52 -0700
Rainer Weikusat <rweikusat@xxxxxxxxxxx> wrote:
William Ahern <william@xxxxxxxxxxxxxxxxxxxxxxxxx> writes:<snip>
time() makes no guarantees about monotonicity.
It is defined as
The time() function shall return the value of time in seconds
since the Epoch.
Which means it is clearly supposed to be monotonic.
What if the "Epoch" changes? time() describes the semantics of a single
call. CLOCK_MONOTONIC describes the relationship of the return values
amongst multiple calls. One _clearly_ dictates the desired behavior, the
other is arguable, and in practice it doesn't do what the OP wants for
technical reasons.
Also, couldn't a conforming implementation simply instantly jump forward or
backwards for a leap second? The Epoch is an astronomical metric, so even if
the second is defined by a relatively constant physical metric, the Epoch
isn't.
.
- References:
- Unix Time and Leap Seconds
- From: David T. Ashley
- Re: Unix Time and Leap Seconds
- From: William Ahern
- Re: Unix Time and Leap Seconds
- From: Rainer Weikusat
- Unix Time and Leap Seconds
- Prev by Date: Re: C wrapper
- Next by Date: Re: C wrapper
- Previous by thread: Re: Unix Time and Leap Seconds
- Next by thread: Re: Unix Time and Leap Seconds
- Index(es):
Relevant Pages
|