Skip to content

Commit

Permalink
Work around nim-lang/Nim#13368
Browse files Browse the repository at this point in the history
  • Loading branch information
c-blake committed Feb 8, 2020
1 parent 3d468d6 commit 9196912
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion procs.nim
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,8 @@ proc procSysStat*(): SysStat =
for line in lines("/proc/stat"):
let cols = line.splitWhitespace(maxSplit=1)
if cols.len != 2: continue
let (nm, rest) = (cols[0], cols[1])
let nm = cols[0]
let rest = cols[1]
if nm.startsWith("cpu"): result.cpu.add rest.parseCPUInfo
elif nm == "intr": result.interrupts =
parseInt(rest.splitWhitespace(maxSplit=1)[0])
Expand Down

0 comments on commit 9196912

Please sign in to comment.