mirror of https://github.com/lcpz/lain.git
Merge pull request #46 from ztombol/fix-cpuwidget
fix cpu load calculation
This commit is contained in:
commit
de67546f6e
|
@ -43,9 +43,9 @@ local function worker(args)
|
||||||
local total = 0
|
local total = 0
|
||||||
for field in string.gmatch(times, "[%s]+([^%s]+)")
|
for field in string.gmatch(times, "[%s]+([^%s]+)")
|
||||||
do
|
do
|
||||||
-- 3 = idle, 4 = ioWait. Essentially, the CPUs have done
|
-- 4 = idle, 5 = ioWait. Essentially, the CPUs have done
|
||||||
-- nothing during these times.
|
-- nothing during these times.
|
||||||
if at == 3 or at == 4
|
if at == 4 or at == 5
|
||||||
then
|
then
|
||||||
idle = idle + field
|
idle = idle + field
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue