mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Event: Use -1.0 for undefined/unset timestamps
This can happen if either there's no network timestamp associated with an event, or there's currently no event being dispatched. Using 0.0 isn't great as it's the normal start timestamp before reading a network packet. Using -1.0 gives the caller a chance to check and realize what's going on.
This commit is contained in:
parent
e2e13902f3
commit
7b4b1779bf
5 changed files with 29 additions and 4 deletions
6
NEWS
6
NEWS
|
@ -24,6 +24,12 @@ Breaking Changes
|
|||
a small overhead when enabled. There's not enough users of network timestamp
|
||||
metadata to justify the complexity of treating it separate.
|
||||
|
||||
- The ``current_event_time()`` builtin function as well as ``Event::Time()``
|
||||
and ``EventMgr::CurrentEventTime()`` now return ``-1.0`` if not timestamp
|
||||
metadata is available for the current event, or if no event is being
|
||||
dispatched. Previously this would've likely been 0.0, or the previously
|
||||
dispatched event.
|
||||
|
||||
New Functionality
|
||||
-----------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue