From c0aa5cf0c4df55a542a3f5c060fb840da4bc0b2d Mon Sep 17 00:00:00 2001 From: weidai Date: Sun, 20 Jun 2004 17:56:15 +0000 Subject: port to CodeWarrior 8.3 git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@175 57ff6487-cd31-0410-9ec3-f628ee90f5f0 --- hrtimer.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'hrtimer.h') 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(); }; -- cgit v1.2.1