// StopWatch class
// P. Conrad, Feb 26, 2004
// Modified by Dan Roche, Feb 27, 2006
// measures elapsed CPU time

#ifndef STOPWATCH_H
#define STOPWATCH_H

#include <ctime>
using std::clock_t;

class StopWatch 
{
private: 
  clock_t startTime; // time the stop watch was started
  clock_t stopTime; // stop the stop watch
  int value;  // current value of stop watch, in microseconds
public:
  StopWatch(); // constructor: make a new stopwatch
  void reset(); // reset the stopwatch
  void stop(); // stop the stopwatch
  void start(); // start the stopwatch
  int readValue(); // read the value of the stopwatch in milliseconds.

};

#endif // STOPWATCH_H

