33#ifndef DVD_CORE_TIME_APPLICATION_TIMER_H_
34#define DVD_CORE_TIME_APPLICATION_TIMER_H_
43using TimeValue = std::chrono::time_point<std::chrono::high_resolution_clock>;
44using NSec = std::chrono::nanoseconds;
45using USec = std::chrono::microseconds;
46using MSec = std::chrono::milliseconds;
47using Sec = std::chrono::seconds;
57 void reset()
noexcept;
60 [[nodiscard]]
F32 getFps()
const noexcept;
FrameRateHandler _frameRateHandler
void resetFPSCounter() noexcept
F32 getFrameTime() const noexcept
PROPERTY_R(F32, speedfactor, 1.0f)
PROPERTY_R(U32, targetFrameRate, Config::TARGET_FRAME_RATE)
ApplicationTimer() noexcept
PROPERTY_R(string, benchmarkReport, "")
F32 getFps() const noexcept
U64 _lastBenchmarkTimeStamp
void getFrameRateAndTime(F32 &fpsOut, F32 &frameTimeOut) const noexcept
constexpr U16 TARGET_FRAME_RATE
Application desired framerate for physics and input simulations.
D64 ElapsedSeconds() noexcept
U64 ElapsedMicroseconds() noexcept
U64 ElapsedNanoseconds() noexcept
The following functions force a timer update (a call to query performance timer).
D64 ElapsedMilliseconds() noexcept
std::chrono::microseconds USec
std::chrono::nanoseconds NSec
std::chrono::milliseconds MSec
std::chrono::time_point< std::chrono::high_resolution_clock > TimeValue