]> git.ipfire.org Git - thirdparty/chrony.git/commit
sys_macosx: make drift removal interval dynamic
authorBryan Christianson <bryan@whatroute.net>
Tue, 18 Aug 2015 08:24:27 +0000 (20:24 +1200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 18 Aug 2015 08:43:20 +0000 (10:43 +0200)
commit7c4db99d44c5fcaeb576e9067be4b0f1f9c2859d
tree01fc312d1de02aded0d410321051de0725382254
parent30b621391084599e5715077e163daf34d68552ff
sys_macosx: make drift removal interval dynamic

Adjust the drift removal interval based on the observed offset_sd.
A newly calculated interval goes into effect after the current drift
removal has completed. When offset_sd is high, the interval is increased
resulting in fewer wakeups to adjust the drift offset. At lower values
of offset_sd the drift removal adjustment interval is pinned to 0.5
seconds. The predicted error applied at the start of an adjustment is
based on the remaining time of the drift removal that is currently in
effect. Default drift removal adjustment interval is 4.0 seconds (was
1.0). If not synchronised set interval to  maximum of default interval
and current interval. Clamp elapsed drift removal time to
[0, current_drift_removal_interval] to cover clock stepping.
sys_macosx.c