From: Miroslav Lichvar Date: Fri, 21 Jul 2017 13:02:49 +0000 (+0200) Subject: sourcestats: increase number of samples needed to check delay X-Git-Tag: 3.2-pre1~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa2c59d78d4e3344f13c593bd0f6778caa111bf3;p=thirdparty%2Fchrony.git sourcestats: increase number of samples needed to check delay Require at least 6 samples to check the increase in the delay of a new sample to make it more reliable. --- diff --git a/sourcestats.c b/sourcestats.c index 847d81fb..3e8926de 100644 --- a/sourcestats.c +++ b/sourcestats.c @@ -784,7 +784,7 @@ SST_IsGoodSample(SST_Stats inst, double offset, double delay, { double elapsed, allowed_increase, delay_increase; - if (inst->n_samples < 3) + if (inst->n_samples < 6) return 1; elapsed = UTI_DiffTimespecsToDouble(when, &inst->offset_time);