From c6a1211706c560910b9a37c0612fa84ac4b25882 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 7 Mar 2008 04:43:08 +0000 Subject: [PATCH] - 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 --- checkin_notes | 7 +++++++ wrapper/wrapper.C | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/checkin_notes b/checkin_notes index a61713dae0..37447e1fb0 100644 --- a/checkin_notes +++ b/checkin_notes @@ -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 diff --git a/wrapper/wrapper.C b/wrapper/wrapper.C index 12958289a4..e3ec69c9f3 100644 --- a/wrapper/wrapper.C +++ b/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