#ifndef BABBLEMUD_TIMER_H
#define BABBLEMUD_TIMER_H

#include <string>
#include <iostream>

using namespace std;

class timer
{
#ifdef WIN32
	__int64 start_;
	__int64	counterFrequency_;
#else
	long long start_;
#endif

private:

	const string reason_;
	double * total_;
	ostream * os_;

public:

	// constructor remembers time it was constructed
	// and where to output to
	// and where to store the total
	timer (const string & reason, ostream * os = &cout, double * total = NULL);

	// destructor gets current time, displays difference
	~timer () throw ();

};    // end of class timer


#endif // BABBLEMUD_TIMER_H

