mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 04:15:07 -05:00
reference: fix adjusting of last reference update time
The timestamp is in cooked time, it needs to be adjusted on all changes, not only on step.
This commit is contained in:
@@ -147,11 +147,13 @@ handle_slew(struct timeval *raw,
|
||||
LCL_ChangeType change_type,
|
||||
void *anything)
|
||||
{
|
||||
double delta;
|
||||
|
||||
if (change_type == LCL_ChangeUnknownStep) {
|
||||
last_ref_update.tv_sec = 0;
|
||||
last_ref_update.tv_usec = 0;
|
||||
} else if (change_type == LCL_ChangeStep) {
|
||||
UTI_AddDoubleToTimeval(&last_ref_update, -doffset, &last_ref_update);
|
||||
} else if (last_ref_update.tv_sec) {
|
||||
UTI_AdjustTimeval(&last_ref_update, cooked, &last_ref_update, &delta, dfreq, doffset);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user