home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2005 October / Gamestar_77_2005-10_dvd.iso / Utility / attsetup.exe / plugins / api / vc++ / example / cpuload / CpuUsage.h < prev    next >
C/C++ Source or Header  |  2004-06-06  |  397b  |  26 lines

  1. #ifndef _CPUUSAGE_H
  2. #define _CPUUSAGE_H
  3.  
  4. #include <windows.h>
  5.  
  6. class CCpuUsage
  7. {
  8. public:
  9.     CCpuUsage();
  10.     virtual ~CCpuUsage();
  11.  
  12. // Methods
  13.     int GetCpuUsage();
  14.     int GetCpuUsage(LPCTSTR pProcessName);
  15.  
  16.     BOOL EnablePerformaceCounters(BOOL bEnable = TRUE);
  17.  
  18. // Attributes
  19. private:
  20.     bool            m_bFirstTime;
  21.     LONGLONG        m_lnOldValue ;
  22.     LARGE_INTEGER    m_OldPerfTime100nSec;
  23. };
  24.  
  25.  
  26. #endif