Closed sthen closed 3 years ago
If the OS doesn't have SO_TIMESTAMPNS then fping chooses CLOCK_MONOTONIC for its timer if available. This results in bogus values for timestamps with fping -D as it uses an uptime-based clock rather than realtime.
$ fping -D -c1 127.0.0.1 2> /dev/null [596040.03537] 127.0.0.1 : [0], 64 bytes, 0.122 ms (0.122 avg, 0% loss)
This was introduced in 754a21e2bdf2 (https://github.com/schweikert/fping/blob/eac20347bac9aa396fa1c2039c57e7603862e6cc/src/fping.c#L127) when SO_TIMESTAMP was replaced with SO_TIMESTAMPNS.
Oh, this is a duplicate of https://github.com/schweikert/fping/issues/203
If the OS doesn't have SO_TIMESTAMPNS then fping chooses CLOCK_MONOTONIC for its timer if available. This results in bogus values for timestamps with fping -D as it uses an uptime-based clock rather than realtime.
This was introduced in 754a21e2bdf2 (https://github.com/schweikert/fping/blob/eac20347bac9aa396fa1c2039c57e7603862e6cc/src/fping.c#L127) when SO_TIMESTAMP was replaced with SO_TIMESTAMPNS.