diff options
author | Tim Creech <tcreech@umd.edu> | 2016-02-26 23:23:27 -0500 |
---|---|---|
committer | Tim Creech <tcreech@umd.edu> | 2016-02-26 23:23:27 -0500 |
commit | 0cf3cfa3afc442313234d2769f41858c2636c754 (patch) | |
tree | abdeb15381b72f4bed3882c1e368e65ebae179a0 /freebsd | |
parent | 797bcd096181e201dcedd097abc72d0191da4879 (diff) |
Fix low CPU usage reporting in FreeBSD
Diffstat (limited to 'freebsd')
-rw-r--r-- | freebsd/FreeBSDProcessList.c | 6 |
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]; |