mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 02:45:07 -05:00
reference: update our reference time on slew
This commit is contained in:
@@ -50,7 +50,7 @@ static int our_leap_sec;
|
|||||||
static int our_stratum;
|
static int our_stratum;
|
||||||
static uint32_t our_ref_id;
|
static uint32_t our_ref_id;
|
||||||
static IPAddr our_ref_ip;
|
static IPAddr our_ref_ip;
|
||||||
struct timeval our_ref_time; /* Stored relative to reference, NOT local time */
|
struct timeval our_ref_time;
|
||||||
static double our_skew;
|
static double our_skew;
|
||||||
static double our_residual_freq;
|
static double our_residual_freq;
|
||||||
static double our_root_delay;
|
static double our_root_delay;
|
||||||
@@ -162,6 +162,8 @@ handle_slew(struct timeval *raw,
|
|||||||
double delta;
|
double delta;
|
||||||
struct timeval now;
|
struct timeval now;
|
||||||
|
|
||||||
|
UTI_AdjustTimeval(&our_ref_time, cooked, &our_ref_time, &delta, dfreq, doffset);
|
||||||
|
|
||||||
if (change_type == LCL_ChangeUnknownStep) {
|
if (change_type == LCL_ChangeUnknownStep) {
|
||||||
last_ref_update.tv_sec = 0;
|
last_ref_update.tv_sec = 0;
|
||||||
last_ref_update.tv_usec = 0;
|
last_ref_update.tv_usec = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user