main: cancel clock correction before dumping sources

On exit, cancel the remaining clock correction before measurements are
saved to dumpdir to fix them for the state in which chronyd will start
again.
This commit is contained in:
Miroslav Lichvar
2021-02-03 10:25:41 +01:00
parent a2372b0c3a
commit 3cef7f975c
3 changed files with 17 additions and 0 deletions

13
local.c
View File

@@ -687,6 +687,19 @@ LCL_MakeStep(void)
/* ================================================== */
void
LCL_CancelOffsetCorrection(void)
{
struct timespec raw;
double correction;
LCL_ReadRawTime(&raw);
LCL_GetOffsetCorrection(&raw, &correction, NULL);
LCL_AccumulateOffset(correction, 0.0);
}
/* ================================================== */
int
LCL_CanSystemLeap(void)
{