7 if (durationSeconds.raw_value() < 0)
10 durationSeconds = ae::q20_12_t{0};
28 return ae::q20_12_t::from_raw_value(
35 return ae::q20_12_t::from_raw_value(
36 static_cast<int32_t
>((
static_cast<uint64_t
>(elapsedFrames) << 12) /
TARGET_FPS));
42 if (duration.raw_value() == 0)
44 return ae::q20_12_t{1};
46 return MathManager::getInstance().div(
getElapsed(), duration);
bool isFinished()
Checks if the timer expired.
ae::q20_12_t getDuration()
Gets duration of the timer.
ae::q20_12_t getProgress()
Gets progress of how much of the time has passed.
void start(ae::q20_12_t durationSeconds)
Starts a timer.
ae::q20_12_t getElapsed()
Gets elapsed time since the timer was started.
void logMessage(LogSeverity severity, std::string_view message, std::source_location location)
Logs a diagnostic message and halts only for fatal messages.
Util to handle error logging.
Timer util to track if a duration has passed.
constexpr uint32_t TARGET_FPS