diff options
author | Daniel Lange <DLange@git.local> | 2024-01-10 12:40:37 +0100 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2024-01-10 12:40:37 +0100 |
commit | 7271b076b82785ffca73ee9e4ae84cabb77018ee (patch) | |
tree | e8270dd60ec096bee8157dbadf029e15ed584592 /LoadAverageMeter.c | |
parent | f288666edc9180a2e81e6655951878124f321df6 (diff) | |
download | debian_htop-7271b076b82785ffca73ee9e4ae84cabb77018ee.tar.gz debian_htop-7271b076b82785ffca73ee9e4ae84cabb77018ee.tar.bz2 debian_htop-7271b076b82785ffca73ee9e4ae84cabb77018ee.zip |
New upstream version 3.3.0upstream/3.3.0upstream
Diffstat (limited to 'LoadAverageMeter.c')
-rw-r--r-- | LoadAverageMeter.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/LoadAverageMeter.c b/LoadAverageMeter.c index 3fe3d90..30c58bb 100644 --- a/LoadAverageMeter.c +++ b/LoadAverageMeter.c @@ -5,12 +5,14 @@ Released under the GNU GPLv2+, see the COPYING file in the source distribution for its full text. */ +#include "config.h" // IWYU pragma: keep + #include "LoadAverageMeter.h" #include "CRT.h" +#include "Machine.h" #include "Object.h" #include "Platform.h" -#include "ProcessList.h" #include "RichString.h" #include "XUtils.h" @@ -47,12 +49,12 @@ static void LoadAverageMeter_updateValues(Meter* this) { if (this->values[0] < 1.0) { this->curAttributes = OK_attributes; this->total = 1.0; - } else if (this->values[0] < this->pl->activeCPUs) { + } else if (this->values[0] < this->host->activeCPUs) { this->curAttributes = Medium_attributes; - this->total = this->pl->activeCPUs; + this->total = this->host->activeCPUs; } else { this->curAttributes = High_attributes; - this->total = 2 * this->pl->activeCPUs; + this->total = 2 * this->host->activeCPUs; } xSnprintf(this->txtBuffer, sizeof(this->txtBuffer), "%.2f/%.2f/%.2f", this->values[0], this->values[1], this->values[2]); @@ -79,12 +81,12 @@ static void LoadMeter_updateValues(Meter* this) { if (this->values[0] < 1.0) { this->curAttributes = OK_attributes; this->total = 1.0; - } else if (this->values[0] < this->pl->activeCPUs) { + } else if (this->values[0] < this->host->activeCPUs) { this->curAttributes = Medium_attributes; - this->total = this->pl->activeCPUs; + this->total = this->host->activeCPUs; } else { this->curAttributes = High_attributes; - this->total = 2 * this->pl->activeCPUs; + this->total = 2 * this->host->activeCPUs; } xSnprintf(this->txtBuffer, sizeof(this->txtBuffer), "%.2f", this->values[0]); |