mirror of https://github.com/BOINC/boinc.git
- wrapper: report CPU time correctly when >1 job
wrapper/ wrapper.C svn path=/trunk/boinc_samples/; revision=13049
This commit is contained in:
parent
8b17523767
commit
2d5e4467a4
|
@ -387,3 +387,9 @@ David 13 June 2007
|
|||
David 19 June 2007
|
||||
example_app/
|
||||
uc2_graphics.C
|
||||
|
||||
David 28 June 2007
|
||||
- wrapper: report CPU time correctly when >1 job
|
||||
|
||||
wrapper/
|
||||
wrapper.C
|
||||
|
|
|
@ -67,6 +67,7 @@ struct TASK {
|
|||
string command_line;
|
||||
double final_cpu_time;
|
||||
double starting_cpu;
|
||||
// how much CPU time was used by tasks before this in the job file
|
||||
#ifdef _WIN32
|
||||
HANDLE pid_handle;
|
||||
HANDLE thread_handle;
|
||||
|
@ -402,7 +403,11 @@ double TASK::cpu_time() {
|
|||
}
|
||||
|
||||
void send_status_message(TASK& task, double frac_done) {
|
||||
boinc_report_app_status(task.cpu_time(), task.starting_cpu, frac_done);
|
||||
boinc_report_app_status(
|
||||
task.starting_cpu + task.cpu_time(),
|
||||
task.starting_cpu,
|
||||
frac_done
|
||||
);
|
||||
}
|
||||
|
||||
// Support for multiple tasks.
|
||||
|
|
Loading…
Reference in New Issue