]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
sourcestats: drop disabled code in SST_GetSelectionData()
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 3 Nov 2025 11:29:03 +0000 (12:29 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 4 Nov 2025 13:47:35 +0000 (14:47 +0100)
sourcestats.c

index fcc501a22f14d9c4bc92e583e79f225414f06842..80105408df8dadf3f77dd0dc0c3d3f637c81ac15 100644 (file)
@@ -675,20 +675,6 @@ SST_GetSelectionData(SST_Stats inst, struct timespec *now,
   *offset_lo_limit = offset - *root_distance;
   *offset_hi_limit = offset + *root_distance;
 
-#if 0
-  double average_offset, elapsed;
-  int average_ok;
-  /* average_ok ignored for now */
-  elapsed = UTI_DiffTimespecsToDouble(now, &inst->offset_time);
-  average_offset = inst->estimated_offset + inst->estimated_frequency * elapsed;
-  if (fabs(average_offset - offset) <=
-      inst->peer_dispersions[j] + 0.5 * inst->peer_delays[i]) {
-    average_ok = 1;
-  } else {
-    average_ok = 0;
-  }
-#endif
-
   i = get_runsbuf_index(inst, 0);
   *first_sample_ago = UTI_DiffTimespecsToDouble(now, &inst->sample_times[i]);
   i = get_runsbuf_index(inst, inst->n_samples - 1);