mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 23:58:20 +00:00
Move the functions and variables in Net.h to the zeek::net namespace. This includes moving network_time out of util.h.
This commit is contained in:
parent
ca9baec6e8
commit
e7c6d51ae7
55 changed files with 461 additions and 374 deletions
|
@ -96,12 +96,13 @@ void TimerMgr::Process()
|
|||
// pseudo-realtime), advance the timer here to the current time since otherwise it won't
|
||||
// move forward and the timers won't fire correctly.
|
||||
iosource::PktSrc* pkt_src = zeek::iosource_mgr->GetPktSrc();
|
||||
if ( ! pkt_src || ! pkt_src->IsOpen() || reading_live || net_is_processing_suspended() )
|
||||
net_update_time(current_time());
|
||||
if ( ! pkt_src || ! pkt_src->IsOpen() || zeek::net::reading_live || zeek::net::net_is_processing_suspended() )
|
||||
zeek::net::detail::net_update_time(current_time());
|
||||
|
||||
// Just advance the timer manager based on the current network time. This won't actually
|
||||
// change the time, but will dispatch any timers that need dispatching.
|
||||
current_dispatched += Advance(network_time, max_timer_expires - current_dispatched);
|
||||
zeek::net::current_dispatched += Advance(zeek::net::network_time,
|
||||
max_timer_expires - zeek::net::current_dispatched);
|
||||
}
|
||||
|
||||
void TimerMgr::InitPostScript()
|
||||
|
@ -185,7 +186,7 @@ double PQ_TimerMgr::GetNextTimeout()
|
|||
{
|
||||
Timer* top = Top();
|
||||
if ( top )
|
||||
return std::max(0.0, top->Time() - ::network_time);
|
||||
return std::max(0.0, top->Time() - zeek::net::network_time);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue