diff options
author | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2004-06-20 17:56:15 +0000 |
---|---|---|
committer | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2004-06-20 17:56:15 +0000 |
commit | c0aa5cf0c4df55a542a3f5c060fb840da4bc0b2d (patch) | |
tree | 2499058561875821704789052533e0c6c2c79891 /hrtimer.h | |
parent | 443398ff862b10dde571782ff8a1a068ad95e159 (diff) | |
download | cryptopp-c0aa5cf0c4df55a542a3f5c060fb840da4bc0b2d.tar.gz |
port to CodeWarrior 8.3
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@175 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'hrtimer.h')
-rw-r--r-- | hrtimer.h | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -5,8 +5,6 @@ NAMESPACE_BEGIN(CryptoPP) -#ifdef HIGHRES_TIMER_AVAILABLE - class TimerBase { public: @@ -28,22 +26,24 @@ private: word64 m_start; }; -//! high resolution timer -class Timer : public TimerBase +//! measure CPU time spent executing instructions of this thread (if supported by OS) +/*! /note This only works correctly on Windows NT or later. On Unix it reports process time, and others wall clock time. +*/ +class ThreadUserTimer : public TimerBase { public: - Timer(Unit unit = TimerBase::SECONDS, bool stuckAtZero = false) : TimerBase(unit, stuckAtZero) {} + ThreadUserTimer(Unit unit = TimerBase::SECONDS, bool stuckAtZero = false) : TimerBase(unit, stuckAtZero) {} word64 GetCurrentTimerValue(); word64 TicksPerSecond(); }; -//! measure CPU time spent executing instructions of this thread (if supported by OS) -/*! /note This only works correctly on Windows NT or later. On Unix it reports process time, and on Windows 98 wall clock time. -*/ -class ThreadUserTimer : public TimerBase +#ifdef HIGHRES_TIMER_AVAILABLE + +//! high resolution timer +class Timer : public TimerBase { public: - ThreadUserTimer(Unit unit = TimerBase::SECONDS, bool stuckAtZero = false) : TimerBase(unit, stuckAtZero) {} + Timer(Unit unit = TimerBase::SECONDS, bool stuckAtZero = false) : TimerBase(unit, stuckAtZero) {} word64 GetCurrentTimerValue(); word64 TicksPerSecond(); }; |