From e04df3b9611c8be665d08c895bceef66ba24616d Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 19 Aug 2021 16:08:43 -0400 Subject: [PATCH] TT#101150 use rtpe_now for uptime Change-Id: Idd7e56058c9f27ca05b242bed52fe1f623bc9cbd --- daemon/statistics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/statistics.c b/daemon/statistics.c index ae8d9fb98..3d9f31eab 100644 --- a/daemon/statistics.c +++ b/daemon/statistics.c @@ -488,7 +488,7 @@ GQueue *statistics_gather_metrics(void) { HEADER("totalstatistics", "Total statistics (does not include current running sessions):"); HEADER("{", ""); - METRIC("uptime", "Uptime of rtpengine", "%llu", "%llu seconds", (unsigned long long) time(NULL)-rtpe_totalstats.started); + METRIC("uptime", "Uptime of rtpengine", "%llu", "%llu seconds", (long long) rtpe_now.tv_sec-rtpe_totalstats.started); PROM("uptime_seconds", "gauge"); METRIC("managedsessions", "Total managed sessions", UINT64F, UINT64F, num_sessions);