summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHisham <hisham@gobolinux.org>2016-02-29 21:57:47 -0300
committerHisham <hisham@gobolinux.org>2016-02-29 21:57:47 -0300
commit4f1bd232d81bd75f923acaa4f200c623871e3384 (patch)
treebde52107fffb8553c0e22920cc5b5c5cf97da7d4
parent84a69b1ea4bb8995e0e563916acb0332fa1cf5f4 (diff)
parent03af73bbc726b92ab246ff65ae999f79715d4d00 (diff)
Merge branch 'master' of https://github.com/hishamhm/htop
-rw-r--r--freebsd/FreeBSDProcessList.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/freebsd/FreeBSDProcessList.c b/freebsd/FreeBSDProcessList.c
index 06499beb..ebb07620 100644
--- a/freebsd/FreeBSDProcessList.c
+++ b/freebsd/FreeBSDProcessList.c
@@ -212,9 +212,6 @@ static inline void FreeBSDProcessList_scanCPUTime(ProcessList* pl) {
unsigned long *cp_time_n; // old clicks state
unsigned long *cp_time_o; // current clicks state
- unsigned long long total_o = 0;
- unsigned long long total_n = 0;
- unsigned long long total_d = 0;
unsigned long cp_time_d[CPUSTATES];
double cp_time_p[CPUSTATES];
@@ -251,6 +248,9 @@ static inline void FreeBSDProcessList_scanCPUTime(ProcessList* pl) {
}
// diff old vs new
+ unsigned long long total_o = 0;
+ unsigned long long total_n = 0;
+ unsigned long long total_d = 0;
for (int s = 0; s < CPUSTATES; s++) {
cp_time_d[s] = cp_time_n[s] - cp_time_o[s];
total_o += cp_time_o[s];