aboutsummaryrefslogtreecommitdiffstats
path: root/TasksMeter.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2020-08-27 07:48:10 +0200
committerDaniel Lange <DLange@git.local>2020-08-27 07:48:10 +0200
commitf3147ea2d1598914c2db53e8cfb34c8ff81e2ff4 (patch)
tree3ee82b2af2ab3d38b6e4b07f3994516aac72f742 /TasksMeter.c
parentdf568a576f7b44ac5a2b9b7222c7f39d9932f626 (diff)
downloaddebian_htop-f3147ea2d1598914c2db53e8cfb34c8ff81e2ff4.tar.gz
debian_htop-f3147ea2d1598914c2db53e8cfb34c8ff81e2ff4.tar.bz2
debian_htop-f3147ea2d1598914c2db53e8cfb34c8ff81e2ff4.zip
New upstream version 3.0.0upstream/3.0.0
Diffstat (limited to 'TasksMeter.c')
-rw-r--r--TasksMeter.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/TasksMeter.c b/TasksMeter.c
index f56c861..8a913ec 100644
--- a/TasksMeter.c
+++ b/TasksMeter.c
@@ -15,7 +15,7 @@ in the source distribution for its full text.
}*/
int TasksMeter_attributes[] = {
- CPU_KERNEL, PROCESS_THREAD, PROCESS, TASKS_RUNNING
+ CPU_SYSTEM, PROCESS_THREAD, PROCESS, TASKS_RUNNING
};
static void TasksMeter_updateValues(Meter* this, char* buffer, int len) {
@@ -37,9 +37,9 @@ static void TasksMeter_display(Object* cast, RichString* out) {
Meter* this = (Meter*)cast;
Settings* settings = this->pl->settings;
char buffer[20];
-
+
int processes = (int) this->values[2];
-
+
xSnprintf(buffer, sizeof(buffer), "%d", processes);
RichString_write(out, CRT_colors[METER_VALUE], buffer);
int threadValueColor = CRT_colors[METER_VALUE];
@@ -76,7 +76,7 @@ MeterClass TasksMeter_class = {
.defaultMode = TEXT_METERMODE,
.maxItems = 4,
.total = 100.0,
- .attributes = TasksMeter_attributes,
+ .attributes = TasksMeter_attributes,
.name = "Tasks",
.uiName = "Task counter",
.caption = "Tasks: "

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