From c30b5cbc4d2019dfdd942a5b157e30602402f5cc Mon Sep 17 00:00:00 2001 From: Arne Welzel Date: Wed, 15 Mar 2023 15:06:54 +0100 Subject: [PATCH] TimerMgr: No network_time updates in Process() network_time forwarding will now happen centrally in the main loop. The TimerMgr returns a valid timeout that can be waited for and will trigger network_time advancement, so we don't need to do it. --- src/Timer.cc | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/Timer.cc b/src/Timer.cc index 6908e81f95..b92dfd5c1f 100644 --- a/src/Timer.cc +++ b/src/Timer.cc @@ -93,14 +93,6 @@ int TimerMgr::Advance(double arg_t, int max_expire) void TimerMgr::Process() { - // If we don't have a source, or the source is closed, or we're reading live (which includes - // 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 = iosource_mgr->GetPktSrc(); - if ( ! pkt_src || ! pkt_src->IsOpen() || run_state::reading_live || - run_state::is_processing_suspended() ) - run_state::detail::update_network_time(util::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. run_state::current_dispatched += Advance(run_state::network_time,