gyp build error fix
This commit is contained in:
parent
78c65ecab4
commit
c201497226
11
lib/cpu.js
11
lib/cpu.js
@ -253,10 +253,19 @@ function cpuTemperature(callback) {
|
|||||||
}
|
}
|
||||||
if (_darwin) {
|
if (_darwin) {
|
||||||
let smc = require('../build/Release/smc');
|
let smc = require('../build/Release/smc');
|
||||||
let cores = ['TC1C', 'TC2C', 'TC3C', 'TC4C', 'TC5C', 'TC6C', 'TC7C', 'TC8C'];
|
|
||||||
|
let cores = ['TC0P', 'TC1C', 'TC2C', 'TC3C', 'TC4C', 'TC5C', 'TC6C', 'TC7C', 'TC8C'];
|
||||||
let sum = 0;
|
let sum = 0;
|
||||||
|
let id = 0;
|
||||||
cores.forEach(function(key) {
|
cores.forEach(function(key) {
|
||||||
let value = smc.get(key);
|
let value = smc.get(key);
|
||||||
|
if (id == 0) {
|
||||||
|
if (value > 0) {
|
||||||
|
result.main = value
|
||||||
|
result.max = value;
|
||||||
|
}
|
||||||
|
id = 1;
|
||||||
|
}
|
||||||
if (value > 0) {
|
if (value > 0) {
|
||||||
result.cores.push(value);
|
result.cores.push(value);
|
||||||
sum = sum + value;
|
sum = sum + value;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user