time.h design issues
eggert at twinsun.com
Mon Aug 30 05:32:58 UTC 1999
Date: 29 Aug 1999 23:18:53 -0000
From: "D. J. Bernstein" <djb at cr.yp.to>
Old timestamps have a defined relationship to civil time; old tick
counters do not. Most time functions simply don't make sense for
These are good arguments that the current draft API is too complex.
However, I'm not yet convinced that we should throw out TIME_MONOTONIC
entirely, given its utility for important classes of applications.
I already gave the example of the ``make'' program; if you use tick
counters here instead of timestamps, you get disastrous results
after a reboot.
`make' is stuck between a rock and a hard place. There is no perfect
solution based solely on time stamps of real-world hosts where clocks
are supposed to be accurate, but sometimes aren't.
Obviously TIME_MONOTONIC wouldn't solve make's problem. But it would
solve the (different) problem of real-time measurements in the
presence of real-world clock adjustments better than a pure UTC or TAI
based approach would.
More information about the tz