Codechange: introduce a framework for all our timers

IntervalTimer and TimeoutTimer use RAII, and can be used to replace
all the time-based timeouts, lag-detection, "execute every N" we
have.
As it uses RAII, you can safely use it as static variable, class
member, temporary variable, etc. As soon as it goes out-of-scope,
it will be safely removed.
This allows for much easier to read code when it comes to intervals.
This commit is contained in:
Patric Stout
2023-04-13 17:16:48 +02:00
committed by Patric Stout
parent 730687080a
commit 5e1bcee39b
12 changed files with 591 additions and 85 deletions

8
src/timer/CMakeLists.txt Normal file
View File

@@ -0,0 +1,8 @@
add_files(
timer_game_calendar.cpp
timer_game_calendar.h
timer_window.cpp
timer_window.h
timer_manager.h
timer.h
)