summaryrefslogtreecommitdiffstats
path: root/TasksMeter.c
diff options
context:
space:
mode:
authorExplorer09 <explorer09@gmail.com>2021-08-14 09:24:35 +0800
committerBenBE <BenBE@geshi.org>2021-08-14 11:16:03 +0200
commit2d1b6f47836119b6318d4fa3abae5b312bf380d7 (patch)
treea02aef0014822898db8739d50ff6b9cc37866919 /TasksMeter.c
parentfc2377f0525badb11e0d1e04dd31a53769855229 (diff)
TasksMeter: save some float casts
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
Diffstat (limited to 'TasksMeter.c')
-rw-r--r--TasksMeter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/TasksMeter.c b/TasksMeter.c
index 9fb6c804..29d3dd1b 100644
--- a/TasksMeter.c
+++ b/TasksMeter.c
@@ -31,7 +31,7 @@ static void TasksMeter_updateValues(Meter* this) {
this->values[3] = MINIMUM(pl->runningTasks, pl->activeCPUs);
this->total = pl->totalTasks;
- xSnprintf(this->txtBuffer, sizeof(this->txtBuffer), "%d/%d", (int) this->values[3], (int) this->total);
+ xSnprintf(this->txtBuffer, sizeof(this->txtBuffer), "%u/%u", MINIMUM(pl->runningTasks, pl->activeCPUs), pl->totalTasks);
}
static void TasksMeter_display(const Object* cast, RichString* out) {

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