Crypto++
8.3
Free C++ class library of cryptographic schemes
|
Go to the documentation of this file.
6 #ifndef CRYPTOPP_HRTIMER_H
7 #define CRYPTOPP_HRTIMER_H
11 #if !defined(HIGHRES_TIMER_AVAILABLE) || (defined(CRYPTOPP_WIN32_AVAILABLE) && !defined(THREAD_TIMER_AVAILABLE))
17 #ifdef HIGHRES_TIMER_AVAILABLE
53 : m_timerUnit(unit), m_stuckAtZero(stuckAtZero), m_started(false)
54 , m_start(0), m_last(0) {}
78 double ElapsedTimeAsDouble();
89 unsigned long ElapsedTime();
95 bool m_stuckAtZero, m_started;
ThreadUserTimer(Unit unit=TimerBase::SECONDS, bool stuckAtZero=false)
Construct a ThreadUserTimer.
@ MICROSECONDS
Timer unit is microseconds.
TimerWord TicksPerSecond()
Retrieve ticks per second.
Measure CPU time spent executing instructions of this thread.
word64 TimerWord
TimerWord is a 64-bit word.
@ MILLISECONDS
Timer unit is milliseconds.
virtual TimerWord TicksPerSecond()=0
Retrieve ticks per second.
TimerWord GetCurrentTimerValue()
Retrieve the current timer value.
TimerBase(Unit unit, bool stuckAtZero)
Construct a TimerBase.
virtual TimerWord GetCurrentTimerValue()=0
Retrieve the current timer value.
@ SECONDS
Timer unit is seconds.
Crypto++ library namespace.
Library configuration file.
Timer(Unit unit=TimerBase::SECONDS, bool stuckAtZero=false)
Construct a Timer.