aboutsummaryrefslogtreecommitdiffstats
path: root/LoadAverageMeter.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2024-01-10 11:17:08 +0100
committerDaniel Lange <DLange@git.local>2024-01-10 11:17:08 +0100
commite7372d18a1a661d8c3dba9f51e1f17b5f94171a7 (patch)
treee8270dd60ec096bee8157dbadf029e15ed584592 /LoadAverageMeter.c
parent937052b231259a47d881d539ad5748245ef55b99 (diff)
downloaddebian_htop-e7372d18a1a661d8c3dba9f51e1f17b5f94171a7.tar.gz
debian_htop-e7372d18a1a661d8c3dba9f51e1f17b5f94171a7.tar.bz2
debian_htop-e7372d18a1a661d8c3dba9f51e1f17b5f94171a7.zip
New upstream version 3.3.0
Diffstat (limited to 'LoadAverageMeter.c')
-rw-r--r--LoadAverageMeter.c16
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]);

© 2014-2024 Faster IT GmbH | imprint | privacy policy