#include <TimingProfile.h>
|
using | Clock = std::chrono::high_resolution_clock |
|
◆ Clock
◆ State
Enumerator |
---|
Ready | |
Running | |
Ran | |
◆ TimingProfile()
TimingProfile::TimingProfile |
( |
| ) |
|
|
inline |
◆ ~TimingProfile()
virtual TimingProfile::~TimingProfile |
( |
| ) |
|
|
inlinevirtual |
◆ Clear()
void TimingProfile::Clear |
( |
| ) |
|
◆ GetDuration() [1/2]
Clock::duration TimingProfile::GetDuration |
( |
const std::string & |
label | ) |
|
|
inline |
◆ GetDuration() [2/2]
TimingProfile::Clock::duration TimingProfile::GetDuration |
( |
Timer & |
timer | ) |
|
Returns the time point difference
◆ GetElapsedTime() [1/2]
template<typename Duration >
Duration::rep TimingProfile::GetElapsedTime |
( |
const std::string & |
label | ) |
|
|
inline |
◆ GetElapsedTime() [2/2]
template<typename Duration >
Duration::rep TimingProfile::GetElapsedTime |
( |
const Timer & |
timer | ) |
|
|
inline |
Returns the elapsed time for a particular timer
◆ GetElapsedTime_s() [1/2]
double TimingProfile::GetElapsedTime_s |
( |
const std::string & |
label | ) |
|
|
inline |
◆ GetElapsedTime_s() [2/2]
double TimingProfile::GetElapsedTime_s |
( |
Timer & |
timer | ) |
|
Returns the total elapsed time in seconds to three decimal places. If the timer is running, this function returns the elapsed time up until now. If the timer has been stopped, this function returns the elapsed time between the start and stop. If the timer hasn't been run yet (Ready state), this function returns 0.
◆ GetTimer()
◆ Reset() [1/2]
void TimingProfile::Reset |
( |
const std::string & |
label | ) |
|
|
inline |
◆ Reset() [2/2]
void TimingProfile::Reset |
( |
Timer & |
timer | ) |
|
Resets the timer, this can have different effects based on the state of the timer: 1) Ready - No effect 2) Running - Resets the elapsed time to zero and continues running 3) Ran - Resets the elapsed time to zero and places the timer back into the Ready state
◆ Start() [1/2]
Timer & TimingProfile::Start |
( |
const std::string & |
label | ) |
|
|
inline |
◆ Start() [2/2]
void TimingProfile::Start |
( |
Timer & |
timer | ) |
|
Starts the timer. Calling Start while the timer is running will reset its elapsed time. Calling Start after the timer has been started and stopped will reset its elapsed time, it does not pause and unpause the running elapsed time.
◆ Stop() [1/2]
void TimingProfile::Stop |
( |
const std::string & |
label | ) |
|
|
inline |
◆ Stop() [2/2]
void TimingProfile::Stop |
( |
Timer & |
timer | ) |
|
Stops the timer, elapsed time will remain constant until calling Reset or Start
◆ m_timers
std::map<std::string, Timer> TimingProfile::m_timers |
|
private |