29#define __WIZARD_ENGINE_INTERNAL__
38 _frame_time = frame_time;
46 _delta_time = delta_time;
50 return SDL_GetTicks();
53void wze::timer::update() {
54 uint32_t end{_last_time + frame_time()};
55 uint32_t now{current_time()};
60 set_delta_time((
float)(now - _last_time));
64uint8_t wze::timer::_frame_time{};
65float wze::timer::_delta_time{};
66uint32_t wze::timer::_last_time{};
static uint8_t frame_time()
Gets the target frame time in milliseconds.
static uint32_t current_time()
Gets the current game time in milliseconds.
static float delta_time()
Gets the current delta time in milliseconds.
static void set_delta_time(float delta_time)
Sets the current delta time in milliseconds.
static void set_frame_time(uint8_t frame_time)
Sets the target frame time in milliseconds.