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.

This commit is contained in:
David Anderson 2013-08-10 22:20:17 -07:00
parent c5842ab728
commit e0a8ac2427
1 changed files with 5 additions and 0 deletions

View File

@ -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;
}