Class for clock. More...
#include <Clock.hpp>
Collaboration diagram for utl::Clock:Public Types | |
| using | TimePoint = std::chrono::time_point<std::chrono::high_resolution_clock> |
Public Member Functions | |
| Clock (const bool startNow=true) | |
| ~Clock ()=default | |
| Clock (const Clock &)=delete | |
| Clock & | operator= (const Clock &)=delete |
| Clock (Clock &&)=delete | |
| Clock & | operator= (Clock &&)=delete |
| void | restart () |
| void | pause () |
| void | resume () |
| float | getDeltaSeconds () const |
| template<typename Duration = std::chrono::seconds> | |
| auto | getElapsed () const |
Static Public Member Functions | |
| static TimePoint | now () |
Private Types | |
| using | Duration = std::chrono::high_resolution_clock::duration |
Private Attributes | |
| TimePoint | m_start |
| TimePoint | m_pausedTime |
| Duration | m_pausedDuration |
| bool | m_isPaused {false} |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const Clock &clock) |
|
private |
| using utl::Clock::TimePoint = std::chrono::time_point<std::chrono::high_resolution_clock> |
|
inlineexplicit |
|
default |
|
delete |
|
delete |
|
inlinenodiscard |
Definition at line 63 of file Clock.hpp.
References m_isPaused, m_pausedDuration, m_pausedTime, m_start, and now().
Here is the call graph for this function:
|
inlinenodiscard |
Definition at line 72 of file Clock.hpp.
References m_pausedDuration, m_start, and now().
Here is the call graph for this function:
|
inlinestatic |
Definition at line 40 of file Clock.hpp.
Referenced by getDeltaSeconds(), getElapsed(), pause(), restart(), and resume().
Here is the caller graph for this function:
|
inline |
Definition at line 47 of file Clock.hpp.
References m_isPaused, m_pausedTime, and now().
Here is the call graph for this function:
|
inline |
Definition at line 41 of file Clock.hpp.
References m_isPaused, m_pausedDuration, m_start, and now().
Here is the call graph for this function:
|
inline |
Definition at line 55 of file Clock.hpp.
References m_isPaused, m_pausedDuration, m_pausedTime, and now().
Here is the call graph for this function:
|
friend |
|
private |
|
private |
Definition at line 82 of file Clock.hpp.
Referenced by getDeltaSeconds(), getElapsed(), restart(), and resume().
|
private |
Definition at line 81 of file Clock.hpp.
Referenced by getDeltaSeconds(), pause(), and resume().
|
private |
Definition at line 80 of file Clock.hpp.
Referenced by getDeltaSeconds(), getElapsed(), and restart().