[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: basesrc
Module Name: basesrc
Committed By: sommerfeld
Date: Mon Sep 6 22:27:44 UTC 1999
Correct precision estimate:
we buzzloop calling gettimeofday() until we see a big jump.
old code would take the difference between the immediately previous return
Now, compute the difference based on the clock value as of right
after the previous big jump.
An alpha pc164 at 500MHz can do about 700 calls to gettimeofday() in
one clock tick, each of which increments tv_usec by 1 -- so the "big
jump" at the end is only ~270us rather than the real clock tick of
976us, which yields a precision value which is overoptimistic by a
factor of ~4. The corrected code now yields the exact tick value
(which is correct since NetBSD/alpha doesn't have a precise
To generate a diff of this commit:
cvs rdiff -r1.5 -r1.6 basesrc/usr.sbin/xntp/xntpd/ntp_proto.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Main Index |
Thread Index |