Skip to content
Skip to link menu
Trinity API Reference
Trinity API Reference
superkaramba
superkaramba
superkaramba
src
cpusensor.h
1
/***************************************************************************
2
* Copyright (C) 2003 by Hans Karlsson *
3
* karlsson.h@home.se *
4
* *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 2 of the License, or *
8
* (at your option) any later version. *
9
***************************************************************************/
10
#ifndef CPUSENSOR_H
11
#define CPUSENSOR_H
12
#include "sensor.h"
13
14
#include <tqfile.h>
15
#include <tqregexp.h>
16
17
class
CPUSensor :
public
Sensor
18
{
19
TQ_OBJECT
20
21
public
:
22
CPUSensor( TQString cpuNbr,
int
interval );
23
~CPUSensor();
24
void
update();
25
void
setMaxValue(
SensorParams
*sp );
26
27
int
getCPULoad();
28
29
private
:
30
long
userTicks;
31
long
sysTicks;
32
long
niceTicks;
33
long
idleTicks;
34
35
int
user;
36
int
system;
37
int
nice;
38
int
idle;
39
40
void
getTicks (
long
&u,
long
&s,
long
&n,
long
&i);
41
TQString cpuNbr;
42
43
};
44
45
#endif
// CPUSENSOR_H
SensorParams
Hans Karlsson.
Definition:
sensorparams.h:32
superkaramba
Skip menu "superkaramba"
Main Page
Alphabetical List
Class List
File List
Class Members
superkaramba
Skip menu "superkaramba"
kcalc
knumber
superkaramba