Leaked source code of windows server 2003
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.

23 lines
482 B

  1. #ifndef CTICKCOUNTER
  2. #define CTICKCOUNTER
  3. extern LONG g_cCallsActive;
  4. class CTickCounter
  5. {
  6. public:
  7. CTickCounter(LPCWSTR pcwszFuncName)
  8. {
  9. m_pcwszFuncName = pcwszFuncName;
  10. m_dwTickCount = GetTickCount();
  11. }
  12. ~CTickCounter()
  13. {
  14. DWORD dwCrtTickCount = GetTickCount();
  15. CONSOLEPRINT0((MAXDWORD, "%d\t%d\t%d\n", dwCrtTickCount-m_dwTickCount, dwCrtTickCount, g_cCallsActive));
  16. }
  17. private:
  18. DWORD m_dwTickCount;
  19. LPCWSTR m_pcwszFuncName;
  20. };
  21. #endif