[gnome-system-monitor] Fixed bogus assignment (bgo #738110)
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-system-monitor] Fixed bogus assignment (bgo #738110)
- Date: Thu, 4 Dec 2014 11:10:07 +0000 (UTC)
commit 7971dc69c61ab77b776b6dff2b1efcdf66a4b65d
Author: Robert Roth <robert roth off gmail com>
Date: Thu Dec 4 13:09:52 2014 +0200
Fixed bogus assignment (bgo #738110)
src/smooth_refresh.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/smooth_refresh.cpp b/src/smooth_refresh.cpp
index 5c0d9fc..2a233ca 100644
--- a/src/smooth_refresh.cpp
+++ b/src/smooth_refresh.cpp
@@ -30,12 +30,12 @@ unsigned SmoothRefresh::get_own_cpu_usage()
if (elapsed) { // avoid division by 0
glibtop_get_proc_time(&proctime, getpid());
usage = (proctime.rtime - this->last_cpu_time) * 100 / elapsed;
+ this->last_cpu_time = proctime.rtime;
}
usage = CLAMP(usage, 0, 100);
this->last_total_time = cpu.total;
- this->last_cpu_time = proctime.rtime;
return usage;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]