From 59b98cf3025c7d551b7ec244321485859ea08eae Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Fri, 17 Jul 2015 14:26:36 -0400 Subject: [PATCH] Timer: Dead code removal --- src/Timer.cpp | 37 ------------------------------------- src/Timer.h | 19 ------------------- 2 files changed, 56 deletions(-) diff --git a/src/Timer.cpp b/src/Timer.cpp index df04d3ccc..1d26fe2f3 100644 --- a/src/Timer.cpp +++ b/src/Timer.cpp @@ -112,40 +112,3 @@ void Timer::subtract (unsigned long value) } //////////////////////////////////////////////////////////////////////////////// -HighResTimer::HighResTimer () -{ - _start.tv_sec = 0; - _start.tv_usec = 0; - - _stop.tv_sec = 0; - _stop.tv_usec = 0; -} - -//////////////////////////////////////////////////////////////////////////////// -HighResTimer::~HighResTimer () -{ -} - -//////////////////////////////////////////////////////////////////////////////// -void HighResTimer::start () -{ - gettimeofday (&_start, NULL); -} - -//////////////////////////////////////////////////////////////////////////////// -void HighResTimer::stop () -{ - gettimeofday (&_stop, NULL); -} - -//////////////////////////////////////////////////////////////////////////////// -double HighResTimer::total () const -{ - if (_stop.tv_sec > 0 || _stop.tv_usec > 0) - return (_stop.tv_sec - _start.tv_sec) + - (_stop.tv_usec - _start.tv_usec) / 1000000.0; - - return 0.0; -} - -//////////////////////////////////////////////////////////////////////////////// diff --git a/src/Timer.h b/src/Timer.h index 231c3a028..c0137d1b2 100644 --- a/src/Timer.h +++ b/src/Timer.h @@ -52,25 +52,6 @@ private: unsigned long _total; }; -// HighResTimer is a stop watch with microsecond resolution. -class HighResTimer -{ -public: - HighResTimer (); - ~HighResTimer (); - HighResTimer (const HighResTimer&); - HighResTimer& operator= (const HighResTimer&); - - void start (); - void stop (); - double total () const; - -private: - struct timeval _start; - struct timeval _stop; -}; - - #endif ////////////////////////////////////////////////////////////////////////////////