Time Resolution

Ashley Yakeley ashley at semantic.org
Mon Jan 31 06:42:31 EST 2005

In article <41FE033F.1080507 at cql.com>, Seth Kurtzberg <seth at cql.com> 

> If, say, I make two calls to read the current time, and both return the 
> same value, what does that mean? 

That's an interesting question. For "Unix time" that's not supposed to 
happen: successive calls must return strictly later times unless the 
clock has been set back by more than a certain amount. This only really 
becomes an issue for leap-seconds, when one is trying to set the clock 
back one second. In such a case, successive clock calls increment one 
tick until time has caught up.

It might be helpful to have the platform-dependent clock resolution 
available as a value.

> Clearly these are two different things. 

Well, the system clock is just one of many sources for time values. The 
user might be dealing with times from some other clock, or measured 
times from a scientific experiment, or appointment times from a 
datebook, or phenomenon times from astronomical calculations. How should 
these all be represented?

> The core of the time 
> calculation can be shared by these two different types of time, but at 
> the user level it needs to be clear whether a value is derived from the 
> system clock, or is not.  I don't see any way around the need for a 
> different interface for each.  The alternatives are unacceptable.

Wouldn't the user already know whether a value is derived from the 
system clock or not, from the program they write?

Ashley Yakeley, Seattle WA

More information about the Libraries mailing list