On Thu, Dec 8, 2011 at 11:50, Miroslav Lichvar <mlich...@redhat.com> wrote: > They are milliseconds. If ntpd on Windows can really keep the clock > stable to to ~10 microseconds, the recent suggestion posted here to > never use Windows for serious timekeeping might need to be revisited.
It can, with the stars aligned properly. It's far from assured. The best results come from WS2003/WinXP and earlier versions of Windows, where the Windows port of ntpd is nearly always able to interpolate a high-precision clock from the combination of the stepping system clock (10-15ms tick) and the so-called performance counter. The challenge is adaptively aligning the two counters, and the scheme currently used breaks down with Vista and later due to being unable to schedule sampling of the correlation at a multiple of the clock rate: typically the clock ticks every 0.5 or 1 msec yet scheduling is limited to 1 msec precision. With a little luck, ntpd automatically uses the native windows clock directly (typically showing precision=-10), but setting NTPD_USE_SYSTEM_CLOCK to any value in the system environment variables might be useful to force the correct choice with ntpd 4.2.7. Once you have a system where ntpd interpolation works well, the next challenge is PPSAPI. The windows port can use PPSAPI provider DLLs and includes sample skeleton source code. So far the only such DLL is paired with a lightly tweaked Windows serial.sys known as serialpps.sys. Search for serialpps-ppsapi-provider to find it and decide if you're willing to install unsigned driver code that claims to timestamp DCD. The results are worse than FreeBSD or Linux I suspect the difference is mostly due to the interpolation code having to guess at when, on the counter timescale, the system clock ticked up to the present value. Some ugly busy-looping logic might help refine that and also overcome the incompatibility with newer Windows versions' clocks. Cheers, Dave Hart _______________________________________________ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions