You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
482 B
24 lines
482 B
#ifndef CTICKCOUNTER
|
|
#define CTICKCOUNTER
|
|
|
|
extern LONG g_cCallsActive;
|
|
|
|
class CTickCounter
|
|
{
|
|
public:
|
|
CTickCounter(LPCWSTR pcwszFuncName)
|
|
{
|
|
m_pcwszFuncName = pcwszFuncName;
|
|
m_dwTickCount = GetTickCount();
|
|
}
|
|
~CTickCounter()
|
|
{
|
|
DWORD dwCrtTickCount = GetTickCount();
|
|
CONSOLEPRINT0((MAXDWORD, "%d\t%d\t%d\n", dwCrtTickCount-m_dwTickCount, dwCrtTickCount, g_cCallsActive));
|
|
}
|
|
|
|
private:
|
|
DWORD m_dwTickCount;
|
|
LPCWSTR m_pcwszFuncName;
|
|
};
|
|
#endif
|