Commit Graph

6 Commits

Author SHA1 Message Date
Carbenium
e6f36f83b8 tests/EventMap: Add tests for Repeat 2020-07-26 23:20:11 +02:00
Carbenium
7865c1c197 Core/EventMap: Clarify documentation of ScheduleEvent 2020-07-26 23:20:11 +02:00
Carbenium
4470b91223 Core/EventMap: Unify semantics of DelayEvents
DelayEvents(Milliseconds delay) had different semantics than
DelayEvents(Milliseconds delay, uint32 group).
The first method delayed the events only in the case the internal timer
already ticked at least for the amount of delay. In contrast the latter method
delayed events regardless of the internal timer value.

Use the latter semantics for DelayEvents(Milliseconds delay) as well which makes
the outcome more predictable. Adapt tests accordingly.
2020-07-26 23:20:11 +02:00
Carbenium
e877f988d1 tests/EventMap: Test for event past it's execution time
With the switch to std::chrono return type of GetTimeUntilEvent
we don't run into an overflow condition which happend with the previous
uint32 return value if the events scheduled execution time is in the past.
Test for this case.
2020-07-26 23:20:11 +02:00
Carbenium
8cb35b0d5f EventMap: Change GetTimeUntilEvent to return std::chrono types 2020-07-26 23:20:11 +02:00
Carbenium
7950275697 tests: Add some basic tests for EventMap 2020-07-24 12:00:54 +02:00