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.

34 lines
671 B

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1995.
  5. //
  6. // File: Idle.hxx
  7. //
  8. // Contents: Idle time tracker.
  9. //
  10. // Classes: CIdleTime
  11. //
  12. // History: 15-Nov-95 KyleP Created
  13. //
  14. //----------------------------------------------------------------------------
  15. #pragma once
  16. class CIdleTime
  17. {
  18. public:
  19. CIdleTime();
  20. unsigned PercentIdle();
  21. private:
  22. LONGLONG _liLastIdleTime;
  23. LONGLONG _liLastTotalTime;
  24. ULONG _cProcessors;
  25. SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION _aProcessorTime[32];
  26. };