Timer: Dead code removal
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
19
src/Timer.h
19
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
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user