API: fix bug causing CPU time under-reporting for compound apps

Check options.send_status_msgs before reporting CPU time on exit
This commit is contained in:
David Anderson 2014-03-03 15:42:04 -08:00
parent fd39d79ad3
commit ed8b75a55c
1 changed files with 5 additions and 3 deletions

View File

@ -1114,9 +1114,11 @@ static void timer_handler() {
return; return;
} }
if (finishing) { if (finishing) {
double cur_cpu = boinc_worker_thread_cpu_time(); if (options.send_status_msgs) {
last_wu_cpu_time = cur_cpu + initial_wu_cpu_time; double cur_cpu = boinc_worker_thread_cpu_time();
update_app_progress(last_wu_cpu_time, last_checkpoint_cpu_time); last_wu_cpu_time = cur_cpu + initial_wu_cpu_time;
update_app_progress(last_wu_cpu_time, last_checkpoint_cpu_time);
}
boinc_disable_timer_thread = true; boinc_disable_timer_thread = true;
return; return;
} }