Re: Linux time code

From: linux
Date: Tue Aug 29 2006 - 11:16:25 EST


>> The Posix-mandated behaviour *requires* diverging from UTC for some
>> time period around the leap second. All you can do is decide how
>> to schedule the divergence.

> POSIX mandates this for gettimeofday() and CLOCK_REALTIME.

> However, a conforming implementation, could (either in userspace or in
> the kernel) provide access to other time bases, include TAI or the
> proposed UTS time scales.

The suggestion is to use UTS to implement CLOCK_REALTIME and
gettimeofday().

Since CLOCK_REALTIME has no specified accuracy bounds, it's a legal
realization, but UTS provides defined behavior when you have better time
sync than the 1s uncertainty inherent in the POSIX spec.

time() is more interesting, since it's so quantized already. Is it better
to have a 2-second second, or to keep it in sync with gettimeofday()
and have 1000 1.001-second seconds?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/