1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-09 23:15:38 -05:00

show cpu percent relative to a core

This commit is contained in:
bbedward
2025-08-08 16:32:59 -04:00
parent 682a8cd7d6
commit bae2bac8f4

View File

@@ -313,10 +313,10 @@ Singleton {
if (prev !== null && totalDiff > 0) {
// Per share all CPUs (matches gnome system monitor)
cpuShare = 100 * Math.max(0, pticks - prev) / totalDiff
//cpuShare = 100 * Math.max(0, pticks - prev) / totalDiff
// per-share per-core
//cpuShare = 100 * cpuCores * Math.max(0, pticks - prev) / totalDiff;
cpuShare = 100 * cpuCores * Math.max(0, pticks - prev) / totalDiff;
}
lastProcTicks[pid] = pticks // update cache