summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/smooth_refresh.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/smooth_refresh.cpp b/src/smooth_refresh.cpp
index 8f6307c..2702851 100644
--- a/src/smooth_refresh.cpp
+++ b/src/smooth_refresh.cpp
@@ -31,12 +31,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;
}