// ElapsedTime.h: interface for the CElapsedTime class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_ELAPSEDTIME_H__EAD23368_00E1_4423_9A09_A3336ED88B92__INCLUDED_)
#define AFX_ELAPSEDTIME_H__EAD23368_00E1_4423_9A09_A3336ED88B92__INCLUDED_

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

#include <afxwin.h>         // MFC core and standard components	// basic types UINT, etc. If these are not defined the mmsystem.h chokes
#include <mmsystem.h>
#include <vector>

enum enElapsedTimerType {typeStandard, typMultimedia, typHighPerformance};

class CElapsedTime  
{
public:
	CElapsedTime();
	virtual ~CElapsedTime();
public:
	double dGetTimeSinceStartSec(int iTimerIndex = 0);
	double dGetElapsedTimeSec(int iTimerIndex=0);
	int iStartElapsedTimer();
protected:
	BOOL m_bPaused;
	enElapsedTimerType timerElapsedTypeAvailable;

	__int64 m_i64Maxi64Int;
	__int64 m_i64Frequency;

	std::vector<__int64> vi64TimeLast;
	std::vector<__int64> vi64TimeStart;

	std::vector<DWORD> vdwTimeLast;
	std::vector<DWORD> vdwTimeStart;

//	LPTIMECAPS m_ptcMMTimerCapability;
	TIMECAPS m_tcMMTimerCapability;

	BOOL m_bMultimedia;
};

#endif // !defined(AFX_ELAPSEDTIME_H__EAD23368_00E1_4423_9A09_A3336ED88B92__INCLUDED_)
