- Wrapper (Mac): use elapse wall time as CPU time;

there's no easy way to get another process's CPU time in Mac OS X

svn path=/trunk/boinc_samples/; revision=14867
This commit is contained in:
David Anderson 2008-03-07 04:43:08 +00:00
parent 3802e31e37
commit c6a1211706
2 changed files with 11 additions and 0 deletions

View File

@ -561,3 +561,10 @@ David 6 Mar 2008
wrapper/
wrapper.C
David 6 Mar 2008
- Wrapper (Mac): use elapse wall time as CPU time;
there's no easy way to get another process's CPU time in Mac OS X
wrapper/
wrapper.C

View File

@ -410,6 +410,10 @@ double TASK::cpu_time() {
totTime = tKernel.QuadPart + tUser.QuadPart;
return totTime / 1.e7;
#else if defined(__APPLE__)
// There's no easy way to get another process's CPU time in Mac OS X
//
return wall_cpu_time;
#else
return linux_cpu_time(pid);
#endif