From e9a856cf97d4c5a5e0e197668e7fd9dc28684285 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Mon, 12 Dec 2016 19:03:31 +1100 Subject: [PATCH] Fix uptime --- src/stratifier.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index 0c1dda53..2dc811d0 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -4076,8 +4076,7 @@ static void get_poolstats(sdata_t *sdata, int *sockd) static void get_uptime(sdata_t *sdata, int *sockd) { - time_t now_t = time(NULL); - int uptime = sdata->stats.start_time.tv_sec - now_t; + int uptime = time(NULL) - sdata->stats.start_time.tv_sec; json_t *val; JSON_CPACK(val, "{si}", "uptime", uptime);