mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Change to convert a float to an integer prior to call rrd_update. This patch should fix #122.
This commit is contained in:
parent
603e9d8898
commit
d609b8c80d
2 changed files with 9 additions and 3 deletions
|
|
@ -346,6 +346,12 @@ function round(num, idp)
|
|||
return tonumber(string.format("%." .. (idp or 0) .. "f", num))
|
||||
end
|
||||
|
||||
-- Note that the function below returns a string as returnong a number
|
||||
-- would not help as a new float would be returned
|
||||
function toint(num)
|
||||
return string.format("%u", num)
|
||||
end
|
||||
|
||||
-- Convert bytes to human readable format
|
||||
function bytesToSize(bytes)
|
||||
if(bytes == nil) then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue