Word size assumptions

Eric S. Raymond esr at thyrsus.com
Sat Sep 24 03:34:56 UTC 2016


Hal Murray <hmurray at megapathdsl.net>:
> 
> esr at thyrsus.com said:
> > If you want to have some fun, go look at the calendar code and think about
> > what it would take to backport that to 16-bit hardware. 
> 
> What part of NTP needs calendar code?  That seems like the sort of code you 
> would be trying to rip out.
> 
> A lot of the refclocks get year-month-day info so it might be used there.  
> Could we build a non-refclock version without it?

Probably not.  One thing the calendar code is used for is a complex cyclic-time
scheme that, in NTP's context, solves the problem of time counter wraparound.

The implicit premise is that in the real world maximum clock skew of
any two live systems is bounded to within a fairly small amount. So
when you interpret an NTP timestamp that is sufficiently far away from
current time, you add or subtract the number of calendar cycles
required to make it closer.  I don't understand all the details yet.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>


More information about the devel mailing list