mirror of https://github.com/BOINC/boinc.git
- 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:
parent
3802e31e37
commit
c6a1211706
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue