Skip to content

Commit

Permalink
cpuCurrentSpeed() fix deno workarround
Browse files Browse the repository at this point in the history
  • Loading branch information
sebhildebrandt committed Jan 5, 2025
1 parent 4bfd0c3 commit 01e7f40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/cpu.js
Original file line number Diff line number Diff line change
Expand Up @@ -1003,9 +1003,9 @@ function getCpuCurrentSpeedSync() {
}
} else if (_linux) {
try {
speedStrings = execSync('cat /proc/cpuinfo | grep "cpu MHz" | cut -d " " -f 3', util.execOptsLinux).toString().split('\n');
const speedStrings = execSync('cat /proc/cpuinfo | grep "cpu MHz" | cut -d " " -f 3', util.execOptsLinux).toString().split('\n');
for (let i in speedStrings) {
speeds.push(parseInt(speedStrings, 10));
speeds.push(Math.floor(parseInt(speedStrings, 10) / 10) / 100);
}
} catch {
util.noop();
Expand Down

0 comments on commit 01e7f40

Please sign in to comment.