#include <time.h>

#ifndef STOPWATCH
#define STOPWATCH

class stopwatch
{
public:
	void start() { t = clock(); }
	void stop() { ellapsedTicks = clock() - t; }
	double getEllapsedTicks() { return ellapsedTicks; }
	double getEllapsedTime() { return (float)ellapsedTicks / CLOCKS_PER_SEC; }
private:
	clock_t t;
	clock_t ellapsedTicks;
};

#endif
