cpu() bug fix speed parsing

This commit is contained in:
Sebastian Hildebrandt
2020-12-02 09:07:40 +01:00
parent 22f48346e8
commit 8eda5d5e47
4 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -415,7 +415,7 @@ function getCpu() {
const modelline = util.getValue(lines, 'machdep.cpu.brand_string');
const modellineParts = modelline.split('@');
result.brand = modellineParts[0].trim();
result.speed = modellineParts[1] ? modellineParts.trim() : '0';
result.speed = modellineParts[1] ? modellineParts[1].trim() : '0';
result.speed = parseFloat(result.speed.replace(/GHz+/g, '')).toFixed(2);
_cpu_speed = result.speed;
result = cpuBrandManufacturer(result);