Time Resolution

Ashley Yakeley ashley at semantic.org
Wed Feb 2 05:53:22 EST 2005

In article 
<3429668D0E777A499EE74A7952C382D1031588A4 at EUR-MSG-01.europe.corp.microso
 "Simon Marlow" <simonmar at microsoft.com> wrote:

> Why does the user of the library care about the difference between UTC,
> TAI and POSIX time?  The only way I can think that this really needs to
> be exposed to the programmer is so that they can tell the library
> whether the system clock is running POSIX or TAI time.  For the library
> API, a single notion of time is sufficient, no?

These are the other options:

* Not deal with TAI at all

If we can assume that gettimeofday returns what POSIX says it's supposed 
to, then we don't need TAI. This means not providing any help to people 
who have some other reason to need TAI.

* Have a single type that represents both TAI and UTC naively

This means a single value in the type represents two different actual 
times, depending on whether it's interpreted as TAI or as UTC.

* Have a single type that represents time, with various functions for 
getting TAI and UTC representations

This can't be done, since we don't know future leap-seconds.

Ashley Yakeley, Seattle WA

More information about the Libraries mailing list