diff options
author | Daniel Lange <DLange@git.local> | 2016-04-11 13:01:17 +0200 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2016-04-11 13:01:17 +0200 |
commit | 8c82a38002ce09db2a0b83dab8b598cf1ab0596c (patch) | |
tree | 596b13ab61b4454e347ff476a84c14c2c9dc3441 /freebsd/Platform.c | |
parent | ff9409b1737627857eb47f64f536a3f66b6a09a4 (diff) | |
download | debian_htop-8c82a38002ce09db2a0b83dab8b598cf1ab0596c.tar.gz debian_htop-8c82a38002ce09db2a0b83dab8b598cf1ab0596c.tar.bz2 debian_htop-8c82a38002ce09db2a0b83dab8b598cf1ab0596c.zip |
Imported Upstream version 2.0.1upstream/2.0.1
Diffstat (limited to 'freebsd/Platform.c')
-rw-r--r-- | freebsd/Platform.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/freebsd/Platform.c b/freebsd/Platform.c index 9e0c25b..4185a8b 100644 --- a/freebsd/Platform.c +++ b/freebsd/Platform.c @@ -24,6 +24,7 @@ in the source distribution for its full text. #include <sys/resource.h> #include <vm/vm_param.h> #include <time.h> +#include <math.h> /*{ #include "Action.h" @@ -162,15 +163,15 @@ double Platform_setCPUValues(Meter* this, int cpu) { double percent; double* v = this->values; - v[CPU_METER_NICE] = cpuData->nicePercent; - v[CPU_METER_NORMAL] = cpuData->userPercent; + v[CPU_METER_NICE] = cpuData->nicePercent * cpus; + v[CPU_METER_NORMAL] = cpuData->userPercent * cpus; if (this->pl->settings->detailedCPUTime) { - v[CPU_METER_KERNEL] = cpuData->systemPercent; - v[CPU_METER_IRQ] = cpuData->irqPercent; + v[CPU_METER_KERNEL] = cpuData->systemPercent * cpus; + v[CPU_METER_IRQ] = cpuData->irqPercent * cpus; Meter_setItems(this, 4); percent = v[0]+v[1]+v[2]+v[3]; } else { - v[2] = cpuData->systemAllPercent; + v[2] = cpuData->systemAllPercent * cpus; Meter_setItems(this, 3); percent = v[0]+v[1]+v[2]; } |