summaryrefslogtreecommitdiff
path: root/hrtimer.h
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2004-06-20 17:56:15 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2004-06-20 17:56:15 +0000
commitc0aa5cf0c4df55a542a3f5c060fb840da4bc0b2d (patch)
tree2499058561875821704789052533e0c6c2c79891 /hrtimer.h
parent443398ff862b10dde571782ff8a1a068ad95e159 (diff)
downloadcryptopp-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.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/hrtimer.h b/hrtimer.h
index 3b74b01..4c7402c 100644
--- a/hrtimer.h
+++ b/hrtimer.h
@@ -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();
};