[ntp:questions] Packet timestamps when using Windows-7/Vista

Dave Hart davehart at gmail.com
Fri Dec 11 17:17:39 UTC 2009


On Dec 11, 16:26 UTC, "David J Taylor" wrote:
> The Windows-7 with the reference clock interests me - it's as if the
> packet timestamps are being derived in a completely different way than on
> the LAN-synced system.  I struggle to read the source code in C, so
> perhaps someone who is more familiar could confirm that.

I'm curious about that difference too.  I can tell you that assuming
all the systems are using the -M option (so that interpolation is
disabled on all the Vista and Win7 systems) there is no difference in
the timestamping code used in the RX and TX paths, nor any difference
I can imagine in the network RX timestamp path with a network vs. PPS
refclock time source.

To answer a question that came up on hackers@, Windows does not offer
SO_TIMESTAMP or similar functionality in any release.  ntpd uses its
get_systime() routine in ntp_iocompletionport.c's OnSocketRecv(), the
same routine used to fetch the TX timestamp.  With interpolation
disabled, get_systime() simply calls GetSystemTimeAsFileTime() which
reads the 64-bit system time from shared memory and converts it to NTP
format.  My interpretation is the differences you're seeing are likely
tied to the particular hardware and HAL being used.  I suspect if you
shuffle which boxes have reference clocks, the system clock stepping
back up to a millisecond issue will affect the same systems.

Cheers,
Dave Hart




More information about the questions mailing list