cpu() Apple Silicon M1 frequency
This commit is contained in:
parent
5654ab94b9
commit
57d23559ed
@ -726,8 +726,7 @@ function getCpuCurrentSpeedSync() {
|
|||||||
if (cpus && cpus.length) {
|
if (cpus && cpus.length) {
|
||||||
for (let i in cpus) {
|
for (let i in cpus) {
|
||||||
if ({}.hasOwnProperty.call(cpus, i)) {
|
if ({}.hasOwnProperty.call(cpus, i)) {
|
||||||
let freq = (cpus[i].speed + 1) / 1000;
|
let freq = cpus[i].speed > 100 ? (cpus[i].speed + 1) / 1000 : cpus[i].speed / 10;
|
||||||
freq = freq < 0.1 ? freq * 100 : freq;
|
|
||||||
avgFreq = avgFreq + freq;
|
avgFreq = avgFreq + freq;
|
||||||
if (freq > maxFreq) maxFreq = freq;
|
if (freq > maxFreq) maxFreq = freq;
|
||||||
if (freq < minFreq) minFreq = freq;
|
if (freq < minFreq) minFreq = freq;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user