mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 16:35:06 -05:00
local: reset daemon after unexpected time jump
Add a new change type and use it when an unexpected time jump is detected in the scheduler to reset reference times, offset and slewing, NCR instances (with their polling interval), synchronization status, and drop all sourcestats, manual, refclock and RTC samples. This should make the recovery more graceful if the estimated jump has a large error (e.g. select didn't timeout, or after system suspend).
This commit is contained in:
@@ -273,6 +273,11 @@ slew_samples
|
||||
double delta_time;
|
||||
double old_seconds_fast, old_gain_rate;
|
||||
|
||||
if (change_type == LCL_ChangeUnknownStep) {
|
||||
/* Drop all samples. */
|
||||
n_samples = 0;
|
||||
}
|
||||
|
||||
for (i=0; i<n_samples; i++) {
|
||||
UTI_AdjustTimeval(system_times + i, cooked, system_times + i, &delta_time,
|
||||
dfreq, doffset);
|
||||
|
||||
Reference in New Issue
Block a user