1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-10 07:25:37 -05:00

correct dankgop sampling approach

This commit is contained in:
bbedward
2025-08-09 20:33:21 -04:00
parent 218eefbe19
commit 2d74753ab4
2 changed files with 8 additions and 7 deletions

View File

@@ -275,12 +275,12 @@ Singleton {
perCoreCpuUsage = cpu.coreUsage || []
addToHistory(cpuHistory, cpuUsage)
// Update CPU sample data for the next run
if (cpu.total && cpu.cores) {
// Update CPU sample data for the next run using cursor data
if (cpu.cursor) {
cpuSampleData = {
previousTotal: cpu.total,
previousCores: cpu.cores,
sampleTime: new Date().getTime()
previousTotal: cpu.cursor.total,
previousCores: cpu.cursor.cores,
timestamp: cpu.cursor.timestamp
}
}
}
@@ -373,11 +373,12 @@ Singleton {
proc.command.substring(0, 15) + "..." : (proc.command || "")
})
// Extract cursor data from pticks for next sampling call
if (proc.pid && typeof proc.pticks !== 'undefined') {
newProcSample.push({
pid: proc.pid,
previousTicks: proc.pticks,
sampleTime: new Date().getTime()
timestamp: new Date().getTime()
})
}
}