From e0a8ac242789299e3cabbf2c2f885da1790c2109 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 10 Aug 2013 22:20:17 -0700 Subject: [PATCH] Wrapper (Android): don't get the CPU time of tasks. The function sometimes crashes (under investigation), and the GUI doesn't show CPU time anyway. --- samples/wrapper/wrapper.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/samples/wrapper/wrapper.cpp b/samples/wrapper/wrapper.cpp index c23d06cdd5..ac55f33b66 100644 --- a/samples/wrapper/wrapper.cpp +++ b/samples/wrapper/wrapper.cpp @@ -877,6 +877,10 @@ void TASK::resume() { // so it shouldn't be called too frequently. // double TASK::cpu_time() { +#ifndef ANDROID + // the Android GUI doesn't show CPU time, + // and process_tree_cpu_time() crashes sometimes + // double x = process_tree_cpu_time(pid); // if the process has exited, the above could return zero. // So update carefully. @@ -884,6 +888,7 @@ double TASK::cpu_time() { if (x > current_cpu_time) { current_cpu_time = x; } +#endif return current_cpu_time; }