[LinuxPPS] cross posting [time-nuts] NTP API on Linux 2.6.26
Hal V. Engel
hvengel at astound.net
Sun Jan 11 11:00:22 CET 2009
On Sunday 11 January 2009 01:17:31 Hal V. Engel wrote:
> Looking back over my logs I see this having values between 0.107usec and
> 1.367usec.
One other thing in the code that creates these numbers. Any loop iteration
that is faster than MINSTEP is rejected and MINSTEP is set to 100e-9 which is
100 nanseconds. So if you have a clock that had more resolution than this and
your CPU was fast enough to iterate through the loop faster than every 100
nanoseconds the routine that does this would reject these faster times and it
would give a false reading of the precision of the machine. Notice that the
first condition is true for my machine (IE. my clock has a 40 nanosecond
resolution) and it appears that my machine comes close to the second condition
since some of the time this returns values close to 100ns. So current state
of the art machines with processors that are faster than my machine will for
sure get incorrect results from this.
For those interested this code is located in ntpd/ntp_proto.c int
default_get_precision(void).
Hal
More information about the LinuxPPS
mailing list