Commit 4dfcedbd authored by Martin Blix Grydeland's avatar Martin Blix Grydeland

Fix mgt uptime counter when suspended

Use VTIM_real instead of VTIM_mono for mgt uptime so that the time
won't stop counting when the computer is suspended.
parent 441c29d2
......@@ -694,7 +694,7 @@ mgt_uptime(const struct vev *e, int what)
(void)what;
AN(VSC_C_mgt);
VSC_C_mgt->uptime = static_VSC_C_mgt.uptime =
VTIM_mono() - mgt_uptime_t0;
VTIM_real() - mgt_uptime_t0;
if (heritage.vsm != NULL)
VSM_common_ageupdate(heritage.vsm);
return (0);
......@@ -713,7 +713,7 @@ MGT_Run(void)
struct vev *e;
int i;
mgt_uptime_t0 = VTIM_mono();
mgt_uptime_t0 = VTIM_real();
e = vev_new();
XXXAN(e);
e->callback = mgt_uptime;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment