RunState.h: Deprecate misleadingly named current_packet_timestamp()

This returns current_pseudo, naming it current_packet_timestamp()
is actively misleading.
This commit is contained in:
Arne Welzel 2024-11-11 19:47:23 +01:00
parent 402b768787
commit 54d28a2179
2 changed files with 3 additions and 2 deletions

View file

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

View file

@ -1867,11 +1867,11 @@ double current_time(bool real) {
iosource::PktSrc* src = iosource_mgr->GetPktSrc(); iosource::PktSrc* src = iosource_mgr->GetPktSrc();
if ( run_state::is_processing_suspended() ) if ( run_state::is_processing_suspended() )
return run_state::current_packet_timestamp(); return run_state::detail::current_pseudo;
// We don't scale with pseudo_realtime here as that would give us a // We don't scale with pseudo_realtime here as that would give us a
// jumping real-time. // jumping real-time.
return run_state::current_packet_timestamp() + (t - run_state::current_packet_wallclock()); return run_state::detail::current_pseudo + (t - run_state::current_packet_wallclock());
} }
struct timeval double_to_timeval(double t) { struct timeval double_to_timeval(double t) {