Event: No more network_time updates

The whole docs read like this was only used to update the
network_time, so there may be a follow-up to ditch EventMgr
even being an IOSource (which could be argued it's not IO).
This commit is contained in:
Arne Welzel 2023-03-15 15:05:15 +01:00
parent d4e31e7d2b
commit 2e8176305b

View file

@ -189,22 +189,12 @@ void EventMgr::Describe(ODesc* d) const
void EventMgr::Process()
{
// If we don't have a source, or the source is closed, or we're
// reading live (which includes pseudo-realtime), advance the time
// here to the current time since otherwise it won't move forward.
iosource::PktSrc* pkt_src = iosource_mgr->GetPktSrc();
if ( ! pkt_src || ! pkt_src->IsOpen() || run_state::reading_live )
run_state::detail::update_network_time(util::current_time());
queue_flare.Extinguish();
// While it semes like the most logical thing to do, we dont want
// to call Drain() as part of this method. It will get called at
// the end of net_run after all of the sources have been processed
// and had the opportunity to spawn new events. We could use
// zeek::iosource_mgr->Wakeup() instead of making EventMgr an IOSource,
// but then we couldn't update the time above and nothing would
// drive it forward.
// and had the opportunity to spawn new events.
}
void EventMgr::InitPostScript()