mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 20:15:07 -05:00
Add test for ratio of increase in delay to stddev
Require that the ratio of the increase in delay from the minimum one in the stats data register to the standard deviation of the offsets in the register is less than maxdelaydevratio or the difference between measured offset and predicted offset is larger than the increase in delay. In the allowed delay increase is included also skew and maximum clock frequency error. maxdelaydevratio is 10.0 by default.
This commit is contained in:
10
sources.c
10
sources.c
@@ -794,6 +794,16 @@ SRC_MinRoundTripDelay(SRC_Instance inst)
|
||||
return SST_MinRoundTripDelay(inst->stats);
|
||||
}
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
int
|
||||
SRC_IsGoodSample(SRC_Instance inst, double offset, double delay,
|
||||
double max_delay_dev_ratio, double clock_error, struct timeval *when)
|
||||
{
|
||||
return SST_IsGoodSample(inst->stats, offset, delay, max_delay_dev_ratio,
|
||||
clock_error, when);
|
||||
}
|
||||
|
||||
/* ================================================== */
|
||||
/* This routine is registered as a callback with the local clock
|
||||
module, to be called whenever the local clock changes frequency or
|
||||
|
||||
Reference in New Issue
Block a user