• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdeutils
  • Sitemap
  • Contact Us
 

superkaramba

cpu.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2003 by Hans Karlsson                                   *
00003  *   karlsson.h@home.se                                                      *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  ***************************************************************************/
00010 #ifndef CPUSENSOR_H
00011 #define CPUSENSOR_H
00012 
00013 #include "sensor.h"
00014 
00015 class CPUSensor :  public Sensor
00016 {
00017     Q_OBJECT
00018 public:
00019     CPUSensor(const QString &cpu, int interval);
00020     ~CPUSensor();
00021 
00022     void update();
00023     void setMaxValue(SensorParams *sp);
00024 
00025     int getCPULoad();
00026 
00027 private:
00028     long userTicks;
00029     long sysTicks;
00030     long niceTicks;
00031     long idleTicks;
00032 
00033     int user;
00034     int system;
00035     int nice;
00036     int idle;
00037     int suload;
00038 
00039     void getTicks(long &u, long &s, long &n, long &i);
00040     QString cpuNbr;
00041 
00042 };
00043 
00044 #endif // CPUSENSOR_H

superkaramba

Skip menu "superkaramba"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

kdeutils

Skip menu "kdeutils"
  • ark
  • kcalc
  • kcharselect
  • kdelirc
  • kdessh
  • kdf
  • kfloppy
  • kgpg
  • kjots
  • klaptopdaemon
  • kmilo
  • ksim
  • ktimer
  • kwallet
  • superkaramba
Generated for kdeutils by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal