mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-02 00:40:10 +00:00
Pass current periodic activity time from C
This prevents possible inconsistencies between the C and lua time
This commit is contained in:
parent
f041783792
commit
1c7dabf247
7 changed files with 17 additions and 14 deletions
|
|
@ -15,8 +15,8 @@ require("ts_second")
|
|||
local enable_second_debug = false
|
||||
local ifnames = interface.getIfNames()
|
||||
|
||||
-- NOTE: must use gettimeofday otherwise the seconds may not correspond
|
||||
local when = math.floor(ntop.gettimemsec())
|
||||
-- NOTE: must use value passed by the C otherwise the seconds may not correspond
|
||||
local when = _now
|
||||
|
||||
local function interface_rrd_creation_enabled(ifid)
|
||||
return (ntop.getPref("ntopng.prefs.ifid_"..ifid..".interface_rrd_creation") ~= "false")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue