diff --git a/TasksMeter.c b/TasksMeter.c index 3840bf9bf..b1cecf467 100644 --- a/TasksMeter.c +++ b/TasksMeter.c @@ -29,9 +29,8 @@ static void TasksMeter_updateValues(Meter* this) { this->values[1] = pl->userlandThreads; this->values[2] = pl->totalTasks - pl->kernelThreads - pl->userlandThreads; this->values[3] = MINIMUM(pl->runningTasks, pl->cpuCount); - 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), "%d/%d", (int) this->values[3], pl->totalTasks); } static void TasksMeter_display(const Object* cast, RichString* out) { @@ -68,7 +67,7 @@ const MeterClass TasksMeter_class = { .updateValues = TasksMeter_updateValues, .defaultMode = TEXT_METERMODE, .maxItems = 4, - .total = 100.0, + .total = -1.0, .attributes = TasksMeter_attributes, .name = "Tasks", .uiName = "Task counter",