// Author : Chris Tolley
// Datet  : 6/22/2004
// HiResTimer.h contains the class declaration for a high resolution timer.
// This only works if the computer it is running on has a high resolution timer

#if !defined(AFX_HIRESTIMER_H__402CBA2A_CF6F_4458_A727_38124CF4C95E__INCLUDED_)
#define AFX_HIRESTIMER_H__402CBA2A_CF6F_4458_A727_38124CF4C95E__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <windows.h>

class HiResTimer  
{
public:
	// Default Constructor
	HiResTimer();

	// Destructor
	virtual ~HiResTimer();

	// Initializes the timer.
	void Initialize();

	// Returns true if the computer supports this timer
	bool isSupported() const;

	// Returns the number of seconds that have elapsed since the last time
	// this function was calls
	float getElapsedSeconds();
private:
	// This is the last time the timer was updated
	LARGE_INTEGER m_liLastTime;

	// The frequency of this timer
	LARGE_INTEGER m_liFrequency;
};

#endif // !defined(AFX_HIRESTIMER_H__402CBA2A_CF6F_4458_A727_38124CF4C95E__INCLUDED_)
