23 using TimePoint = std::chrono::time_point<std::chrono::high_resolution_clock>;
43 static TimePoint now() {
return std::chrono::high_resolution_clock::now(); }
96 template <
typename Duration = std::chrono::seconds> [[nodiscard]]
auto getElapsed()
const
102 using Duration = std::chrono::high_resolution_clock::duration;
Duration m_pausedDuration
Clock & operator=(Clock &&)=delete
Clock(const bool startNow=true)
std::chrono::time_point< std::chrono::high_resolution_clock > TimePoint
void restart()
Restart the clock.
float getDeltaSeconds() const
Get the elapsed time in seconds.
std::chrono::high_resolution_clock::duration Duration
void resume()
Resume the clock.
Clock(const Clock &)=delete
void pause()
Pause the clock.
friend std::ostream & operator<<(std::ostream &os, const Clock &clock)
auto getElapsed() const
Get the elapsed time in specified duration.
static TimePoint now()
Get the current time point.
Clock & operator=(const Clock &)=delete