Description
CLOCK_MONOTONIC
is much better for measuring elapsed time. This would improve the reliability of RTTs at the current microsecond precision by avoiding wall-clock issues (no jumps forward or even back). And also fix occasional deadlock: #276 (comment).
This has been suggested in the past () to fix the deadlock and currently raised again when handle #584 (#585 (comment)).
There were in the past attempts to implement it just to avoid the dedlock: old https://lore.kernel.org/netdev/alpine.DEB.1.10.1009051453090.13886@red.crap.retrofitta.se/ and newer #278.
CLOCK_MONOTONIC_RAW
is already used in other parts in ping (together with gettimeofday()
). I'm not sure why @kerolasa haven't converted everything. Moving CLOCK_MONOTONIC_RAW
to CLOCK_MONOTONIC
should be reconsidered.
CLOCK_MONOTONIC
is used in arping, clockdiff, tracpeath (converted from CLOCK_MONOTONIC_RAW
in da9a610).