System.Time.Clock Design Issues
ashley at semantic.org
Fri Feb 4 06:56:00 EST 2005
In article <42035F4E.6000104 at imperial.ac.uk>,
Keean Schupke <k.schupke at imperial.ac.uk> wrote:
> SO in effect what you are saying is that system time is likely to be
> neither TAI nor UTC (as hand setting a clock has a greater than 1 second
> error usually, a non-networked machine will never tell the right time (and
> even a stopped clock tells the right time twice a day!).
Can we make that assumption? There might be ways of keeping the clock
accurate that don't involve TCP/IP.
> I am pretty sure the "clock()" function returns a millisecond count, which
> added to the hardware time at switch on (as the user cannot adjust
> time when the machine is switched off - nor can NTP adjust this) gives
> TAI (possibly with a different start time).
The clock() function drifts and as you say cannot be adjusted, so it
cannot be considered TAI. It is however a good choice for timing
intervals, as it doesn't hiccup.
Ashley Yakeley, Seattle WA
More information about the Libraries