[ntp:questions] SetSystemTimeAdjustment() on Vista

Danny Mayer mayer at ntp.org
Sun May 31 17:47:04 UTC 2009

johumohu at yahoo.com wrote:
> Anybody ever tried to use SetSystemTimeAdjustment() on Vista?

The NTP Reference Implementation uses it for controlling the system
clock. I'm not sure what you are really asking. Dave Hart added some
interpolation code to do a better job of it for Vista and seems to be
okay on earlier versions of Windows. Vista was showing a lot of jitter.

> I tested the accuracy ot the system time on my laptop. During about 6
> hours, the time gets about 1 second too fast. On the basis of the
> description of SetSystemTimeAdjustment(), the TimeAdjust should be
> changed from the default 156001 to 156008. But 156008 makes the time
> too slow. I tried 156002 and it is still too slow, it seems like
> 156001.5 would make it even but you cannot use fractions. In other
> words, the default value 156001 seems to be the best choice. The
> TimeIncrement is 156001. Any insight on this?
> Also, one thing is not clear. The time adjustment is done at each
> interval identified by TimeIncrement which is fixed  15.6001
> millisecond. My question is what happens when the system time is
> updated every 1 millisecond, because on my laptop system time is
> updated mostly every 1 millisecond as long as there is some input
> activity at keyboard or mouse. Does it mean Vista waits until the full
> 15.6001 millisecond is reached when using TimeAdjust?

If you install the latest versions of the NTP reference implementation
you get much better control of the system clock.


This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

More information about the questions mailing list