mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 19:25:07 -05:00
smooth: don't adjust invalid time of last update
This commit is contained in:
5
smooth.c
5
smooth.c
@@ -246,7 +246,8 @@ handle_slew(struct timespec *raw, struct timespec *cooked, double dfreq,
|
|||||||
update_smoothing(cooked, doffset, dfreq);
|
update_smoothing(cooked, doffset, dfreq);
|
||||||
}
|
}
|
||||||
|
|
||||||
UTI_AdjustTimespec(&last_update, cooked, &last_update, &delta, dfreq, doffset);
|
if (!UTI_IsZeroTimespec(&last_update))
|
||||||
|
UTI_AdjustTimespec(&last_update, cooked, &last_update, &delta, dfreq, doffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SMT_Initialise(void)
|
void SMT_Initialise(void)
|
||||||
@@ -264,6 +265,8 @@ void SMT_Initialise(void)
|
|||||||
max_freq *= 1e-6;
|
max_freq *= 1e-6;
|
||||||
max_wander *= 1e-6;
|
max_wander *= 1e-6;
|
||||||
|
|
||||||
|
UTI_ZeroTimespec(&last_update);
|
||||||
|
|
||||||
LCL_AddParameterChangeHandler(handle_slew, NULL);
|
LCL_AddParameterChangeHandler(handle_slew, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user