mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc_samples/; revision=12257
This commit is contained in:
parent
9d8e75f6fe
commit
124bff93f1
|
@ -289,3 +289,9 @@ David 20 Mar 2007
|
|||
uc_graphics.C
|
||||
wrapper/
|
||||
wrapper.C
|
||||
|
||||
David 20 Mar 2007
|
||||
- wrapper (Unix): use more efficient way of getting CPU time
|
||||
|
||||
wrapper/
|
||||
wrapper.C
|
||||
|
|
|
@ -359,14 +359,7 @@ double TASK::cpu_time() {
|
|||
double cpu = totTime / 1.e7;
|
||||
return cpu;
|
||||
#else
|
||||
vector<PROCINFO> pi;
|
||||
procinfo_setup(pi);
|
||||
PROCINFO proc;
|
||||
memset(&proc, 0, sizeof(proc));
|
||||
proc.id = pid;
|
||||
procinfo_app(proc, pi);
|
||||
printf("time: %f\n", proc.user_time+proc.kernel_time);
|
||||
return proc.user_time + proc.kernel_time;
|
||||
return linux_cpu_time(pid);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue