dns: prefer monotonic clock for timeouts
authorA. Wilcox <AWilcox@Wilcox-Tech.com>
Fri, 30 Dec 2022 03:21:32 +0000 (21:21 -0600)
committerRich Felker <dalias@aerifal.cx>
Sun, 12 Feb 2023 23:03:24 +0000 (18:03 -0500)
commit7d756e1c04de6eb3f2b3d3e1141a218bb329fcfb
treebeaef48969dcb8c8fe74cef00a910e78402611cb
parent07616721f1fa6cb215ffbef23441cae80412484f
dns: prefer monotonic clock for timeouts

Before this commit, DNS timeouts always used CLOCK_REALTIME, which
could produce spurious timeouts or delays if wall time changed for
whatever reason.

Now we try CLOCK_MONOTONIC and only fall back to CLOCK_REALTIME when
it is unavailable.
src/network/res_msend.c