mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 16:35:06 -05:00
ntp+hwclock: add margin to estimated delay quantiles
Extend the interval of accepted delays by half of the quantile minimum step in both directions to make room for floating-point errors in the quantile calculation and an error that will be intentionally added in the next commit.
This commit is contained in:
@@ -1742,7 +1742,7 @@ check_delay_quant(NCR_Instance inst, double delay)
|
||||
|
||||
quant = QNT_GetQuantile(inst->delay_quant, QNT_GetMinK(inst->delay_quant));
|
||||
|
||||
if (delay <= quant)
|
||||
if (delay <= quant + QNT_GetMinStep(inst->delay_quant) / 2.0)
|
||||
return 1;
|
||||
|
||||
DEBUG_LOG("maxdelayquant: delay=%e quant=%e", delay, quant);
|
||||
|
||||
Reference in New Issue
Block a user