parseInt radix added
This commit is contained in:
parent
ea81c75e78
commit
265c2ebd2f
@ -9,7 +9,7 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>systeminformatiomn</h1>
|
||||
<h1>systeminformation</h1>
|
||||
<p>Simple system and OS information library for node.js</p>
|
||||
</body>
|
||||
|
||||
|
||||
@ -557,7 +557,7 @@ function cpuTemperature(callback) {
|
||||
let sum = 0;
|
||||
let lines = stdout.split('\r\n').filter(line => line.trim() !== '').filter((line, idx) => idx > 0);
|
||||
lines.forEach(function (line) {
|
||||
let value = (parseInt(line) - 2732) / 10;
|
||||
let value = (parseInt(line, 10) - 2732) / 10;
|
||||
sum = sum + value;
|
||||
if (value > result.max) result.max = value;
|
||||
result.cores.push(value);
|
||||
@ -787,8 +787,8 @@ function cpuCache(callback) {
|
||||
result.l1i = 0;
|
||||
result.l2 = util.getValue(lines, 'l2cachesize', '=');
|
||||
result.l3 = util.getValue(lines, 'l3cachesize', '=');
|
||||
if (result.l2) { result.l2 = parseInt(result.l2) * 1024; }
|
||||
if (result.l3) { result.l3 = parseInt(result.l3) * 1024; }
|
||||
if (result.l2) { result.l2 = parseInt(result.l2, 10) * 1024; }
|
||||
if (result.l3) { result.l3 = parseInt(result.l3, 10) * 1024; }
|
||||
}
|
||||
exec(util.getWmic() + ' path Win32_CacheMemory get CacheType,InstalledSize,Purpose', function (error, stdout) {
|
||||
if (!error) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user