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:
Miroslav Lichvar
2014-06-02 17:14:28 +02:00
parent a3e60c93da
commit a33a955163
10 changed files with 48 additions and 11 deletions

View File

@@ -74,7 +74,8 @@ extern void LCL_GetOffsetCorrection(struct timeval *raw, double *correction, dou
typedef enum {
LCL_ChangeAdjust,
LCL_ChangeStep
LCL_ChangeStep,
LCL_ChangeUnknownStep
} LCL_ChangeType;
typedef void (*LCL_ParameterChangeHandler)