PktSrc/RunState: Scale on first_wallclock and move pseudo realtime logic to RunState

check_pseudo_time() used zeek_start_time which skews things sufficiently
around being in the past when ZAM compilation takes multiple seconds. Switch
to using first_wallclock instead.

Further, move setting of first_timestamp and first_wallclock from PktSrc
into RunState's dispatch_packet(), so it's more centralized now.

The only pseudo_realtime piece left in PktSrc() is in GetNextTimeout() to
determine how long the PktSrc is idle until the next packet is ready.
This commit is contained in:
Arne Welzel 2024-11-11 20:00:44 +01:00
parent 54d28a2179
commit d9a7f9f36f
3 changed files with 24 additions and 14 deletions

View file

@ -70,7 +70,7 @@ extern void suspend_processing();
extern void continue_processing();
bool is_processing_suspended();
[[deprecated("Remove with v8.1. Use run_state::current_pseudo directly, but you probably should not")]]
[[deprecated("Remove with v8.1. Use run_state::current_pseudo directly if needed.")]]
extern double current_packet_timestamp();
extern double current_packet_wallclock();