improving cpu speed parsing

This commit is contained in:
Sebastian Hildebrandt 2024-01-20 08:31:37 +01:00
parent 5c5efe269e
commit 1ae02c1ac4

View File

@ -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;