Crypto++
8.6
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) {}
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.
unsigned long ElapsedTime()
Retrieve the elapsed time.
Measure CPU time spent executing instructions of this thread.
word64 TimerWord
TimerWord is a 64-bit word.
unsigned long long word64
64-bit unsigned datatype
@ MILLISECONDS
Timer unit is milliseconds.
void StartTimer()
Start the timer.
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.
TimerWord GetCurrentTimerValue()
Retrieve the current timer value.
double ElapsedTimeAsDouble()
Retrieve the elapsed time.
Crypto++ library namespace.
Library configuration file.
TimerWord TicksPerSecond()
Retrieve ticks per second.
Timer(Unit unit=TimerBase::SECONDS, bool stuckAtZero=false)
Construct a Timer.