l_fp, time, calendar

Eric S. Raymond esr at thyrsus.com
Sat Mar 25 23:24:10 UTC 2017


Hal Murray <hmurray at megapathdsl.net>:
> 
> fw at fwright.net said:
> > Oh, please, not more timespec crap.  The timeval and timespec stuff was just
> > a workaround for the lack of 64-bit integer support in C.  Once you can
> > count on 64-bit integers, then integer nanoseconds is a much cleaner format.
> >  A signed 64-bit nanosecond count has a range of +/- 292 years. 
> 
> Neat.  Thanks.

I disagree with Fred, because 292 years is way too short an era.  He's
describing yet another kludge that will turn on us.

> Any hints that POSIX is interested?  Are there any library/packages or macros 
> that we can steal/use?  (Much of the code I've been cleaning up is dealing 
> with system interfaces.)

I guaran-damn-tee that POSIX is *not* interested.  POSIX knows
perfectly well that we're an eyeblink from having timespecs with
64-bit members everywhere, which will give us nanosecond granularity
out to approximately 292 billion years from now. Nothing but
end-to-end 64-bit timespecs makes any sense now except for some
unusual cases near physics labs and atomic clocks.  And, for mainly
historical reasons, NTP itself.

Someday there might be a real use for a timespec successor with the
subsecond part scaled in attoseconds, but that day is not yet.

> Eric: If you are keeping a NTP version 5 list, this should go in it.

devel/NTPv5/txt. You can edit it yourself.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>

Please consider contributing to my Patreon page at https://www.patreon.com/esr
so I can keep the invisible wheels of the Internet turning. Give generously -
the civilization you save might be your own.



More information about the devel mailing list