|
|
@ -955,10 +955,12 @@ os.execute('sleep 1') -- Wait for things to start up before checking for them. |
|
|
|
local num = '[%d%.]+[kM]?' |
|
|
|
if APT.checkFile(f) then |
|
|
|
for l in io.lines(f) do |
|
|
|
local speed, crrnt = l:match('^%c *'..num..' +'..num..' +%d+ +%d+[kM]? +%d+ +%d+ +('..num..') +%d+ +[%d%-]+:[%d%-]+:[%d%-]+ +[%d%-]+:[%d%-]+:[%d%-]+ +[%d%-]+:[%d%-]+:[%d%-]+ +('..num..')') |
|
|
|
local speed, crrnt = l:match('^%c *'..num..' +'..num..' +%d+ +'..num..' +%d+ +%d+ +('..num..') +%d+ +[%d%-]+:[%d%-]+:[%d%-]+ +[%d%-]+:[%d%-]+:[%d%-]+ +[%d%-]+:[%d%-]+:[%d%-]+ +('..num..')') |
|
|
|
if nil ~= speed then |
|
|
|
if 'k' == speed:sub(-1, -1) then speed = speed:sub(1, -2) .. '000' end |
|
|
|
if 'k' == crrnt:sub(-1, -1) then crrnt = crrnt:sub(1, -2) .. '000' end |
|
|
|
if 'M' == speed:sub(-1, -1) then speed = speed:sub(1, -2) .. '000000' end |
|
|
|
if 'M' == crrnt:sub(-1, -1) then crrnt = crrnt:sub(1, -2) .. '000000' end |
|
|
|
speed = tonumber(speed) |
|
|
|
crrnt = tonumber(crrnt) |
|
|
|
if speed < min and speed ~= 0 then min = speed end |
|
|
|