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:
Arne Welzel 2025-05-26 16:14:58 +02:00
parent e2e13902f3
commit 7b4b1779bf
5 changed files with 29 additions and 4 deletions

6
NEWS
View file

@ -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
-----------------