opt.: mem usage

This commit is contained in:
lollipopkit
2023-09-13 15:22:48 +08:00
parent 278d5984b2
commit eb158e63a2
44 changed files with 333 additions and 360 deletions

View File

@@ -109,8 +109,8 @@ Cpus parseBsdCpu(String raw) {
.allMatches(raw)
.map((e) => double.parse(e.group(1) ?? '0') * 100)
.toList();
if (percents.length != 3) return initCpuStatus;
return initCpuStatus
if (percents.length != 3) return InitStatus.cpus;
return InitStatus.cpus
..now = [
OneTimeCpuStatus('cpu', percents[0].toInt(), 0, 0,
percents[2].toInt() + percents[1].toInt(), 0, 0, 0)