Skip to content

Commit 8b4b195

Browse files
committed
TasksMeter: remove code for auto-updating "total"
The bar meter drawing code can now update the "total" value automatically. Signed-off-by: Kang-Che Sung <[email protected]>
1 parent 5f9af8d commit 8b4b195

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

TasksMeter.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ static void TasksMeter_updateValues(Meter* this) {
3434
this->values[1] = pt->userlandThreads;
3535
this->values[2] = pt->totalTasks - pt->kernelThreads - pt->userlandThreads;
3636
this->values[3] = MINIMUM(pt->runningTasks, host->activeCPUs);
37-
this->total = pt->totalTasks;
3837

3938
xSnprintf(this->txtBuffer, sizeof(this->txtBuffer), "%u/%u", MINIMUM(pt->runningTasks, host->activeCPUs), pt->totalTasks);
4039
}
@@ -75,7 +74,7 @@ const MeterClass TasksMeter_class = {
7574
.supportedModes = METERMODE_DEFAULT_SUPPORTED,
7675
.maxItems = 4,
7776
.isPercentChart = false,
78-
.total = 100.0,
77+
.total = 1.0,
7978
.attributes = TasksMeter_attributes,
8079
.name = "Tasks",
8180
.uiName = "Task counter",

0 commit comments

Comments
 (0)