Feb. 16, 2015
5:07 a.m.
random832@fastmail.us wrote:
(extending the range of an existing sub-second field is worth considering in some cases, though 32-bit signed nanoseconds only have room for one additional second in this way.)
One additional second is all one needs, no? Two leap seconds are never inserted adjacent to each other. So POSIX's 'struct timespec' suffices to represent leap seconds, and there's no need for a new data type here, just new operations on the type. You could start by adding a new clock to clock_gettime, a clock that respects leap seconds.