///////////////////////////////////////////////////////////////////////////////
/// @file deTimer.hpp
///
/// @brief 
///
/// @author trajar
///
/// This file is the intellectual property of Novus Delta, LLC.. Usage of the
/// contents of this file is subject to the Destiny3D Member License which
/// can be found at http://www.destiny3d.com.  Any other usage is prohibited.
///
/// This file is distributed "AS IS" without warranty of any kind.  Novus
/// Delta, LLC. does not guarantee the fitness of the contents of this file
/// for any particular purpose.
///
/// Copyright (C) 2001-2003 Novus Delta, LLC. All Rights Reserved.
///
/// <hr>
///                                 Change History
/// <hr>
///
/// @date Jun 2002
/// @author trajar
/// @remarks Creation
///
///////////////////////////////////////////////////////////////////////////////

#ifndef _DETIMER_HPP
#define _DETIMER_HPP

#ifndef		_DENET_HPP
 #include	"deNet.hpp"
#endif

#ifndef		_DESYNCHOBJECT_HPP
 #include	"deSynchObject.hpp"
#endif

//-------------------------------------------
// class - deTimer
//-------------------------------------------

class deTimer
{
public:
	deTimer();
	~deTimer()	{ }

	bool			SupportsHighResCounter( void );
	void			StartTimer( void );
	void			StopTimer( void );
	s64				GetTime( void );

private:

	//Auxiliary Function
	void			UpdateElapsed( void );

	//Member variables
	bool			m_bRunning;	
	s64				m_i64Start;
	s64				m_i64Elapsed;
	deSynchObject	m_SynchObject;

	//Some auxiliary variables
	s64				m_i64Counts;
	LARGE_INTEGER	m_liCount;

	//Static Variables
	static bool		sm_bInit;
	static bool		sm_bPerformanceCounter;
	static s64		sm_i64Freq;
};

#endif // _PRECISETIMER_H_


