aboutsummaryrefslogtreecommitdiffstats
path: root/LoadAverageMeter.c
diff options
context:
space:
mode:
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