home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 June / Chip_2002-06_cd1.bin / zkuste / delphi / kompon / d56 / MSYSINFO.ZIP / Int / MSI_CPUUsage.int < prev    next >
Encoding:
Text File  |  2002-03-04  |  1.2 KB  |  45 lines

  1.  
  2. {*******************************************************}
  3. {                                                       }
  4. {         MiTeC System Information Components           }
  5. {          CPU Usage Evaluation Component               }
  6. {           version 7.0 for Delphi 5,6                  }
  7. {                                                       }
  8. {           Copyright ⌐ 1997,2002 Michal Mutl           }
  9. {                                                       }
  10. {*******************************************************}
  11.  
  12. {$INCLUDE MITEC_DEF.INC}
  13.  
  14. unit MSI_CPUUsage;
  15.  
  16. interface
  17.  
  18. uses
  19.   SysUtils, Windows, Classes, ExtCtrls;
  20.  
  21. type
  22.   TOnIntervalEvent = procedure (Sender: TObject; Value: DWORD) of object;
  23.  
  24.   TMCPUUsage = class(TComponent)
  25.   public
  26.     constructor Create(AOwner: TComponent); override;
  27.     destructor Destroy; override;
  28.   published
  29.     property Active: Boolean read GetActive write SetActive;
  30.     property Interval: DWORD read GetInterval write SetInterval;
  31.     property OnInterval: TOnIntervalEvent read FOnInterval write FOnInterval;
  32.   end;
  33.  
  34. function InitNTCPUData: Boolean;
  35. function GetNTCPUData: comp;
  36. procedure ReleaseNTCPUData;
  37.  
  38. const
  39.   ObjCounter = 'KERNEL\CPUUsage';
  40.  
  41.  
  42. implementation
  43.  
  44.  
  45.