00001 #ifndef _LCD_CPU_SENSOR_H_ 00002 #define _LCD_CPU_SENSOR_H_ 00003 00004 #include "LCDSensor.h" 00005 #include <string> 00006 00013 class LCDCpuSensor : public LCDSensor 00014 { 00015 private: 00016 std::string _cpuName; 00017 long _userTicks; 00018 long _sysTicks; 00019 long _niceTicks; 00020 long _idleTicks; 00021 int _load; 00022 00023 void getTicks(long &u,long &s,long &n,long &i); 00024 00025 public: 00026 virtual void waitForChange(); 00027 virtual std::string getCurrentValue(); 00028 00035 LCDCpuSensor(std::string cpuName = "cpu"); 00036 }; 00037 00038 #endif