lfpinit() signed or unsigned?
Hal Murray
hmurray at megapathdsl.net
Fri Mar 10 02:39:13 UTC 2017
gem at rellim.com said:
> So we are now doing modulo arithmetic.
I believe that ntpd expects to be using modular arithmetic for time.
I don't have a handy pointer to any documentation to back that up.
Most of the internal calculations are done with time represented as the
offset from the system time.
----------
PS:
> Everything still fits. At least until 2038. 7FFFFFFFu is 2147483647 which
> as a time_t is "Mon Jan 18 19:14:07 PST 2038".
There are two issues.
Unix time stamps overflow 31 bits in 2038.
NTP time stamps overflow 32 bits in 2036.
https://en.wikipedia.org/wiki/Year_2038_problem#NTP_timestamps
It also has comments on modulo arithmetic.
--
These are my opinions. I hate spam.
More information about the devel
mailing list