]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: clock: use the monotonic clock for idle time calculation
authorWilly Tarreau <w@1wt.eu>
Sun, 8 Sep 2024 18:54:36 +0000 (18:54 +0000)
committerWilly Tarreau <w@1wt.eu>
Tue, 17 Sep 2024 07:08:10 +0000 (09:08 +0200)
commit24496803d16e0397893602b8df8d2c57b3c72087
tree5d92b90c1f6bdec374803fa30a21d2c4b135868d
parent4150851ce5be04f170e828d8e045e72a73628994
MEDIUM: clock: use the monotonic clock for idle time calculation

By just keeping a copy of the last known value before entering
polling, we can apply the same algorithm as we're currently using,
except that it's now applied to the monotonic clock instead of the
wall clock, when it's detected that it's ticking. This improves
idle time calculation accuracy by making it independent on the
wall clock.
src/clock.c