[ntp:questions] Re: ntpd transmit timestamp precision

Harlan Stenn stenn at ntp.isc.org
Thu Feb 16 05:40:36 UTC 2006


>>> In article <TuTIf.1718$k6.34212 at nasal.pacific.net.au>, Damion de Soto <damion at cyberguard.com.au> writes:

Damion> ...  (incidently, in the two libraries i've just looked in - glibc &
Damion> uClibc - the clock_gettime() function just calls gettimeofday()
Damion> anyway - so they definately shouldn't be treated differently)

Interesting - what does clock_getres() tell you on those systems?

Damion> the system clock precision is calculated in default_get_precision()
Damion> in ntp_proto.c - this function uses consecutive calls to
Damion> get_systime() to calculate the minimum tick difference.  Won't this
Damion> be always wrong if the random fuzz code in get_systime() is used,
Damion> and give a much higher precision than is really available?

This could easily be fixed by adding another parameter to get_systime() that
would disable the fuzz, assuming it really is a problem (from my initial
glance I think it is a problem, but I am working on way too many things
right now).

H




More information about the questions mailing list