MINOR: stats: use tv_remain() to precisely compute the uptime
authorWilly Tarreau <w@1wt.eu>
Sat, 8 May 2021 05:40:52 +0000 (07:40 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 8 May 2021 08:52:12 +0000 (10:52 +0200)
commitd37e26eaa61692f0217ddec23f63b22fcc55b7f9
treee8f56efab9ed0337e7043214ea5f3c9d86b2969d
parent27456202409820713a6aca31b6df259b1737cf56
MINOR: stats: use tv_remain() to precisely compute the uptime

We'll have to support reporting sub-second uptimes, so let's use the
appropriate function which will automatically adjust the tv_usec field.
In addition to this, it will also report a more accurate uptime thanks
to considering the sub-second part in the result.
src/stats.c