Skip to content

Commit

Permalink
Call time() only once
Browse files Browse the repository at this point in the history
Call time() only once during mainloop() and core_secondly()
  • Loading branch information
michaelortmann authored Dec 30, 2023
1 parent c45924c commit 0643f57
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 0643f57

Please sign in to comment.