DragonFly commits List (threaded) for 2005-04
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
cvs commit: src/usr.sbin/dntpd client.c client.h convert.c defs.h ntpreq.c
dillon 2005/04/24 02:39:27 PDT
DragonFly src repository
Modified files:
usr.sbin/dntpd client.c client.h convert.c defs.h
ntpreq.c
Log:
Change client_check() to calculate the best offset and the best frequency
correction separately.
The best offset correction now utilizes a standard deviation of the offset
error with a minimum of 4 samples. An offset correction occurs when the
standard deviation is less then 1/4 the average offset. When an offset
correction is made, the offset data is cleared (since it becomes invalid
once a correction is made). This calculation gives the code an almost
human perception of when the offset can be safely adjusted, regardless
of the 'mess' on the internet.
Change tv_delta_micro() into tv_delta_double() since most of the callers
were (previously) dividing the result by 1E6.
NOTE: the correllation for frequency correction is not working quite as
well as I had hoped, it's bouncing around a lot for internet ntp sources.
But the standard deviation on the offset appears to work very well.
Revision Changes Path
1.4 +147 -23 src/usr.sbin/dntpd/client.c
1.3 +22 -7 src/usr.sbin/dntpd/client.h
1.3 +3 -3 src/usr.sbin/dntpd/convert.c
1.3 +1 -1 src/usr.sbin/dntpd/defs.h
1.3 +1 -1 src/usr.sbin/dntpd/ntpreq.c
http://www.dragonflybsd.org/cvsweb/src/usr.sbin/dntpd/client.c.diff?r1=1.3&r2=1.4&f=u
http://www.dragonflybsd.org/cvsweb/src/usr.sbin/dntpd/client.h.diff?r1=1.2&r2=1.3&f=u
http://www.dragonflybsd.org/cvsweb/src/usr.sbin/dntpd/convert.c.diff?r1=1.2&r2=1.3&f=u
http://www.dragonflybsd.org/cvsweb/src/usr.sbin/dntpd/defs.h.diff?r1=1.2&r2=1.3&f=u
http://www.dragonflybsd.org/cvsweb/src/usr.sbin/dntpd/ntpreq.c.diff?r1=1.2&r2=1.3&f=u
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]