1 #ifndef CRYPTOPP_HRTIMER_H 2 #define CRYPTOPP_HRTIMER_H 6 #if !defined(HIGHRES_TIMER_AVAILABLE) || (defined(CRYPTOPP_WIN32_AVAILABLE) && !defined(THREAD_TIMER_AVAILABLE)) 12 #ifdef HIGHRES_TIMER_AVAILABLE 23 enum Unit {SECONDS = 0, MILLISECONDS, MICROSECONDS, NANOSECONDS};
25 : m_timerUnit(unit), m_stuckAtZero(stuckAtZero), m_started(false)
26 , m_start(0), m_last(0) {}
28 virtual TimerWord GetCurrentTimerValue() =0;
29 virtual TimerWord TicksPerSecond() =0;
32 double ElapsedTimeAsDouble();
33 unsigned long ElapsedTime();
36 double ConvertTo(TimerWord t,
Unit unit);
52 TimerWord GetCurrentTimerValue();
53 TimerWord TicksPerSecond();
61 TimerWord GetCurrentTimerValue();
62 TimerWord TicksPerSecond();
Timer(Unit unit=TimerBase::SECONDS, bool stuckAtZero=false)
#define NAMESPACE_BEGIN(x)
Library configuration file.
TimerBase(Unit unit, bool stuckAtZero)
unsigned long long word64
ThreadUserTimer(Unit unit=TimerBase::SECONDS, bool stuckAtZero=false)
#define CRYPTOPP_NO_VTABLE
Measure CPU time spent executing instructions of this thread (if supported by OS) ...