From 0643f57bf0b225ae07f1e3b042834c2a782b4bcf Mon Sep 17 00:00:00 2001 From: Michael Ortmann <41313082+michaelortmann@users.noreply.github.com> Date: Sat, 30 Dec 2023 22:06:53 +0100 Subject: [PATCH] Call time() only once Call time() only once during mainloop() and core_secondly() --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 6ac8ec908..1527406bb 100644 --- a/src/main.c +++ b/src/main.c @@ -631,7 +631,7 @@ static void core_secondly() tell_mem_status_dcc(DP_STDOUT); } } - nowmins = time(NULL) / 60; + nowmins = now / 60; if (nowmins > lastmin) { memcpy(&nowtm, localtime(&now), sizeof(struct tm)); i = 0;