Fixes inteface speed visualization with non-needed decimals

This commit is contained in:
Simone Mainardi 2019-09-11 18:10:28 +02:00
parent f4aa1b7072
commit b364116e7b
3 changed files with 2 additions and 24 deletions

View file

@ -178,26 +178,6 @@ function format_utils.bitsToSize(bits)
return(bitsToSizeMultiplier(bits, 1000))
end
-- maxRateToString
function format_utils.maxRateToString(max_rate)
if((max_rate == nil) or (max_rate == "")) then max_rate = -1 end
max_rate = tonumber(max_rate)
if(max_rate < 1000) then
return(max_rate.." Kbit/s")
else
local mr
mr = round(max_rate / 1000, 2)
if(mr < 1000) then
return(mr.." Mbit/s")
else
gbit = mr /1000
return(gbit.." Gbit/s")
end
end
end
function format_utils.formatEpoch(epoch)
if epoch == 0 then
return("")