#include <FastTimer.h>
Public Types | |
typedef std::chrono::high_resolution_clock | Clock |
typedef std::chrono::nanoseconds | Duration |
enum | State { State::kStopped, State::kRunning, State::kPaused } |
Public Member Functions | |
FastTimer () | |
Clock::time_point const & | getStartTime () const |
Clock::time_point const & | getStopTime () const |
void | pause () |
void | reset () |
void | resume () |
double | seconds () const |
double | secondsUntilNow () const |
void | setStartTime (Clock::time_point const &) |
void | setStopTime (Clock::time_point const &) |
void | start () |
State | state () const |
void | stop () |
Duration | untilNow () const |
Duration | value () const |
Private Member Functions | |
std::string const & | describe () const |
Private Attributes | |
Duration | m_duration |
Clock::time_point | m_start |
State | m_state |
Clock::time_point | m_stop |
Definition at line 7 of file FastTimer.h.
typedef std::chrono::high_resolution_clock FastTimer::Clock |
Definition at line 9 of file FastTimer.h.
typedef std::chrono::nanoseconds FastTimer::Duration |
Definition at line 10 of file FastTimer.h.
|
strong |
Enumerator | |
---|---|
kStopped | |
kRunning | |
kPaused |
Definition at line 11 of file FastTimer.h.
FastTimer::FastTimer | ( | ) |
Definition at line 9 of file FastTimer.cc.
|
private |
Definition at line 95 of file FastTimer.cc.
References kPaused, kRunning, kStopped, and m_state.
Referenced by pause(), resume(), setStartTime(), setStopTime(), start(), and stop().
FastTimer::Clock::time_point const & FastTimer::getStartTime | ( | ) | const |
FastTimer::Clock::time_point const & FastTimer::getStopTime | ( | ) | const |
Definition at line 113 of file FastTimer.cc.
References m_stop.
void FastTimer::pause | ( | ) |
Definition at line 40 of file FastTimer.cc.
References ecal_dqm_sourceclient-live_cfg::cerr, describe(), kPaused, kRunning, m_duration, m_start, m_state, m_stop, and fileCollector::now.
Referenced by FastTimerService::preModuleEventDelayedGet().
void FastTimer::reset | ( | void | ) |
Definition at line 62 of file FastTimer.cc.
References kStopped, m_duration, m_start, m_state, and m_stop.
Referenced by FastTimerService::ModuleInfo::reset(), FastTimerService::PathInfo::reset(), and FastTimerService::StreamData::reset().
void FastTimer::resume | ( | ) |
Definition at line 51 of file FastTimer.cc.
References ecal_dqm_sourceclient-live_cfg::cerr, describe(), kPaused, kRunning, m_start, m_state, m_stop, and fileCollector::now.
Referenced by FastTimerService::postModuleEventDelayedGet().
double FastTimer::seconds | ( | ) | const |
Definition at line 75 of file FastTimer.cc.
References KineDebug3::count(), and m_duration.
Referenced by FastTimerService::postModuleEvent().
double FastTimer::secondsUntilNow | ( | ) | const |
void FastTimer::setStartTime | ( | Clock::time_point const & | ) |
Definition at line 117 of file FastTimer.cc.
References ecal_dqm_sourceclient-live_cfg::cerr, describe(), kRunning, kStopped, m_duration, m_start, m_state, and m_stop.
void FastTimer::setStopTime | ( | Clock::time_point const & | ) |
Definition at line 128 of file FastTimer.cc.
References ecal_dqm_sourceclient-live_cfg::cerr, describe(), kRunning, kStopped, m_duration, m_start, m_state, and m_stop.
void FastTimer::start | ( | void | ) |
Definition at line 17 of file FastTimer.cc.
References ecal_dqm_sourceclient-live_cfg::cerr, describe(), kRunning, kStopped, m_duration, m_start, m_state, m_stop, and fileCollector::now.
Referenced by progressbar.ProgressBar::__next__(), and FastTimerService::preModuleEvent().
FastTimer::State FastTimer::state | ( | ) | const |
Definition at line 90 of file FastTimer.cc.
References m_state.
void FastTimer::stop | ( | ) |
Definition at line 29 of file FastTimer.cc.
References ecal_dqm_sourceclient-live_cfg::cerr, describe(), kRunning, kStopped, m_duration, m_start, m_state, m_stop, and fileCollector::now.
Referenced by FastTimerService::postModuleEvent().
FastTimer::Duration FastTimer::untilNow | ( | ) | const |
Definition at line 81 of file FastTimer.cc.
References kRunning, m_duration, m_start, m_state, and fileCollector::now.
Referenced by secondsUntilNow().
FastTimer::Duration FastTimer::value | ( | void | ) | const |
Definition at line 70 of file FastTimer.cc.
References m_duration.
Referenced by average.Average::average().
|
private |
Definition at line 40 of file FastTimer.h.
Referenced by pause(), reset(), seconds(), setStartTime(), setStopTime(), start(), stop(), untilNow(), and value().
|
private |
Definition at line 38 of file FastTimer.h.
Referenced by getStartTime(), pause(), reset(), resume(), setStartTime(), setStopTime(), start(), stop(), and untilNow().
|
private |
Definition at line 41 of file FastTimer.h.
Referenced by describe(), pause(), reset(), resume(), setStartTime(), setStopTime(), start(), state(), stop(), and untilNow().
|
private |
Definition at line 39 of file FastTimer.h.
Referenced by getStopTime(), pause(), reset(), resume(), setStartTime(), setStopTime(), start(), and stop().