]> git.meshlink.io Git - meshlink/commit - src/graph.c
When resetting timers that use CLOCK_MONOTONIC, use a negative value.
authorGuus Sliepen <guus@meshlink.io>
Sat, 11 Apr 2020 15:43:18 +0000 (17:43 +0200)
committerGuus Sliepen <guus@meshlink.io>
Sat, 11 Apr 2020 15:45:03 +0000 (17:45 +0200)
commita10895efa0919ff8e00d1ab732a8690fde2786da
treeaef2d6b4859fb9130819b0e711f55e37125ed624
parent5d583af29b3ba76f9acaeb77c0e0457268776dcb
When resetting timers that use CLOCK_MONOTONIC, use a negative value.

CLOCK_MONOTONIC might be implemented as the time since the CPU booted, so
if MeshLink starts soon after booting, setting timers to "0" might not
actually be far enough in the past to trigger a timeout.

This has almost no effect in practice, since most timeouts are a minute or
less, but it might affect running tests in virtual machines.
src/devtools.c
src/discovery.c
src/graph.c
src/net.c