Force ntpd to make changes in smaller steps
- by David Wolever
The NTP documentation says:
Under ordinariy conditions, ntpd adjusts the clock in small steps so that the timescale is effectively continuous and without discontinuities - http://doc.ntp.org/4.1.0/ntpd.htm
However, this is not at all what I have noticed in practice. If I manually change the system time backwards or forwards 5 or 10 seconds then start ntpd, I notice that it adjusts the clock in one shot.
For example, with this code:
#!/usr/bin/env python
import time
last = time.time()
while True:
time.sleep(1)
print time.time() - last
last = time.time()
When I first change the time, I'll notice something like:
1.00194311142
8.29711604118
1.0010509491
Then when I start NTPd, I'll see something like:
1.00194311142
-8.117301941
1.0010509491
Is there any way to force ntpd to make the adjustments in smaller steps?