Skip to content

Commit

Permalink
improving cpu speed parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
sebhildebrandt committed Jan 20, 2024
1 parent 5c5efe2 commit 1ae02c1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/cpu.js
Expand Up @@ -733,6 +733,7 @@ function getCpu() {
lines = stdout.toString().split('\n');
}
modelline = util.getValue(lines, 'model name') || modelline;
modelline = util.getValue(lines, 'bios model name') || modelline;
const modellineParts = modelline.split('@');
result.brand = modellineParts[0].trim();
result.speed = modellineParts[1] ? parseFloat(modellineParts[1].trim()) : 0;
Expand Down

0 comments on commit 1ae02c1

Please sign in to comment.