mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 19:48:20 +00:00
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:
parent
402b768787
commit
54d28a2179
2 changed files with 3 additions and 2 deletions
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue