diff options
| author | Mozzarella32 <143010987+Mozzarella32@users.noreply.github.com> | 2025-10-18 13:34:07 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-18 13:34:07 +0200 |
| commit | f3e13193a610bbcc36960ded8a25793bcff873b6 (patch) | |
| tree | 5a3588b087e25ac88d1287f050aa98e4bab66f53 /src/helpers/time/Timer.cpp | |
| parent | 8164b90bc2839d4d2a10c0d2b26c4a413ecf90b2 (diff) | |
timer: constify methods (#12079)
Diffstat (limited to 'src/helpers/time/Timer.cpp')
| -rw-r--r-- | src/helpers/time/Timer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/helpers/time/Timer.cpp b/src/helpers/time/Timer.cpp index 95f75441..97338b31 100644 --- a/src/helpers/time/Timer.cpp +++ b/src/helpers/time/Timer.cpp @@ -6,18 +6,18 @@ void CTimer::reset() { m_lastReset = Time::steadyNow(); } -Time::steady_dur CTimer::getDuration() { +Time::steady_dur CTimer::getDuration() const { return Time::steadyNow() - m_lastReset; } -float CTimer::getMillis() { +float CTimer::getMillis() const { return chr::duration_cast<chr::microseconds>(getDuration()).count() / 1000.F; } -float CTimer::getSeconds() { +float CTimer::getSeconds() const { return chr::duration_cast<chr::milliseconds>(getDuration()).count() / 1000.F; } const Time::steady_tp& CTimer::chrono() const { return m_lastReset; -}
\ No newline at end of file +} |
