adj_systeim()

Hal Murray hmurray at megapathdsl.net
Mon Mar 13 00:05:25 UTC 2017


gem at rellim.com said:
> Please check your system to see if adj_systime() is called on your system.
> Eric thinks otherwise. 

I copied your printf from a previous message.

I have a whole screen full of
adj_systime: hello! 0.000000000
adj_systime: hello! 0.000000000
adj_systime: hello! 0.000000000

ntp classic does the same.  (I didn't wait for a whole screen full.)

-----------

>> That doesn't make sense in general.  It doesn't have any new info.
>> How does it know how much to adjust by?
> From the PLL state variables.
>> I'd expect it to adjust the clock in response to a packet.
> Not that I can see.

I'm not doubting your observations, just saying that they don't make sense to 
me.

Consider the typical client case.  You exchange packets and learn the offset 
and drift.  Now it's time to adjust the clock.  Why not do it all in one 
step?  What is to be gained by breaking it up into second size steps?

Adjusting the clock each second would make sense if you didn't have a drift 
correction.

-------

I haven't seen any descriptions of how ntpd works than mention adjusting 
every second.

There is an additional worm in this can.  In reference to saving battery 
power by not waking up every second, I don't remember seeing any comment like 
"Won't work.  Need to kick the clock every second."

I'm pretty sure somebody actually modified ntp-classic to not wakeup every 
second.  That was many many years ago.  It wasn't folded in because Mills 
didn't like it.  If he gave a good reason, I missed it and/or have forgotten. 
 (and I think I would have remembered that there was a good reason even if I 
didn't remember exactly what it was.)




-- 
These are my opinions.  I hate spam.





More information about the devel mailing list