- Client: debug last commit.

Also fix bug where benchmarks don't end when clock goes backward.
This commit is contained in:
David Anderson 2013-03-15 00:03:01 -07:00 committed by Oliver Bock
parent 702798b84b
commit f9520431e9
2 changed files with 4 additions and 4 deletions

View File

@ -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();
}

View File

@ -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"
);