Skip to content

Commit

Permalink
Call time() only once during mainloop() and core_secondly
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Ortmann committed Nov 30, 2023
1 parent 322bddb commit 0836e30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0836e30

Please sign in to comment.