diff --git a/client/client_state.cpp b/client/client_state.cpp index 28fc8af7db..4051356bb9 100644 --- a/client/client_state.cpp +++ b/client/client_state.cpp @@ -280,7 +280,9 @@ void CLIENT_STATE::set_now() { // if time went backward significantly, clear delays // + clock_change = false; if (x < (now-60)) { + clock_change = true; clear_absolute_times(); } @@ -2011,15 +2013,13 @@ int CLIENT_STATE::quit_activities() { #endif -// See if a timestamp in the client state file +// Called at startup to see if a timestamp in the client state file // is later than the current time. // If so, the user must have decremented the system clock. // void CLIENT_STATE::check_clock_reset() { - clock_change = false; if (!time_stats.last_update) return; if (time_stats.last_update <= now) return; - clock_change = true; clear_absolute_times(); } diff --git a/client/cs_benchmark.cpp b/client/cs_benchmark.cpp index 1f621beb0f..f6b60fa691 100644 --- a/client/cs_benchmark.cpp +++ b/client/cs_benchmark.cpp @@ -365,7 +365,7 @@ bool CLIENT_STATE::cpu_benchmarks_poll() { // if active tasks don't quit after 10 sec, give up on benchmark // - if (now >= (cpu_benchmarks_start + 10.0) && active_tasks.is_task_executing()) { + if (gstate.clock_change || now >= (cpu_benchmarks_start + 10.0) && active_tasks.is_task_executing()) { msg_printf(NULL, MSG_INTERNAL_ERROR, "Failed to stop applications; aborting CPU benchmarks" );