diff --git a/src/measure.c b/src/measure.c index c4f2a17..835049b 100644 --- a/src/measure.c +++ b/src/measure.c @@ -87,7 +87,8 @@ void measure_parse(struct measure_params* mp, struct measure_state* ms, uint8_t micro_sec = elapsed_micros (&ms->mp_in->emit_time, &curr); if (ms->mp_in->counter <= mp->max_measure && !ms->mp_in->probe) { - ms->log[ms->mp_in->counter-1] = micro_sec; + // we log only the delay of the first received packet, the fastest + if (ms->log[ms->mp_in->counter-1] == 0) ms->log[ms->mp_in->counter-1] = micro_sec; } else { verbose = 1; fprintf(stderr, "measure will be ignored: probe=%d, counter=%lu, max_measure=%lu\n", ms->mp_in->probe, ms->mp_in->counter, mp->max_measure);