Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup: address review comments
  • Loading branch information
gireeshpunathil committed Feb 19, 2019
commit 1666fa5a0fcce730d8ea11fef48e164ab96b1655
16 changes: 8 additions & 8 deletions lib/os.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,16 @@ function cpus() {
// [] is a bugfix for a regression introduced in 51cea61
const data = getCPUs() || [];
const result = [];
for (var i = 0; i < data.length; i += 7) {
for (var i = 0, j = 0; i < data.length; i++) {
result.push({
model: data[i],
speed: data[i + 1],
model: data[j++],
speed: data[j++],
times: {
user: data[i + 2],
nice: data[i + 3],
sys: data[i + 4],
idle: data[i + 5],
irq: data[i + 6]
user: data[j++],
nice: data[j++],
sys: data[j++],
idle: data[j++],
irq: data[j++]
Comment thread
BridgeAR marked this conversation as resolved.
Outdated
}
});
Comment thread
BridgeAR marked this conversation as resolved.
}
Expand Down