odhcdp: use a more suitable clock
authorDavid Härdeman <[email protected]>
Fri, 10 Oct 2025 20:57:08 +0000 (22:57 +0200)
committerÁlvaro Fernández Rojas <[email protected]>
Tue, 21 Oct 2025 17:01:11 +0000 (19:01 +0200)
commitf48e1c205af3d2b3d0a35615ed5ba6fa2b280241
tree1ced44078676df1945b3f3a59d8c420de9906808
parent7e78caac4eae5dfabc5f2128cac64d37512b0d81
odhcdp: use a more suitable clock

In my testing, CLOCK_MONOTONIC_COARSE uses about 1/3 of the CPU cycles.

And the accuracy is completely irrelevant.

Signed-off-by: David Härdeman <[email protected]>
Link: https://github.com/openwrt/odhcpd/pull/282
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
src/odhcpd.c