Timer: Dead code removal

This commit is contained in:
Paul Beckingham 2015-07-17 14:26:36 -04:00
parent 87b1809ef4
commit 59b98cf302
2 changed files with 0 additions and 56 deletions

View file

@ -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;
}
////////////////////////////////////////////////////////////////////////////////

View file

@ -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
////////////////////////////////////////////////////////////////////////////////