]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
sourcestats: increase number of samples needed to check delay
authorMiroslav Lichvar <mlichvar@redhat.com>
Fri, 21 Jul 2017 13:02:49 +0000 (15:02 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Fri, 21 Jul 2017 14:27:03 +0000 (16:27 +0200)
Require at least 6 samples to check the increase in the delay of a new
sample to make it more reliable.

sourcestats.c

index 847d81fb9e9b3c3660ae952fd116395324caba55..3e8926dee5e151de73d93fd3e48477e93931f203 100644 (file)
@@ -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);