cpuCurrentSpeed() fix cpu loop issue
This commit is contained in:
+1
-1
@@ -1238,7 +1238,7 @@ function getCpuCurrentSpeedSync() {
|
||||
const cores = [];
|
||||
const speeds = [];
|
||||
|
||||
if (cpus && count.length && Object.prototype.hasOwnProperty.call(cpus[0], 'speed')) {
|
||||
if (cpus && cpus.length && Object.prototype.hasOwnProperty.call(cpus[0], 'speed')) {
|
||||
for (let i in cpus) {
|
||||
speeds.push(cpus[i].speed > 100 ? (cpus[i].speed + 1) / 1000 : cpus[i].speed / 10);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user