summaryrefslogtreecommitdiffstats
path: root/src/core/cpuload.h
blob: 3ec4d03ac60c8f30188441bfb4854153e0fdda1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef CPULOAD_H
#define CPULOAD_H

#include <QList>
#include <QByteArray>

class CPULoad
{
public:

    CPULoad();

    void init();
    void update();
    int  cpuLoad() const;

private:
    typedef QList<QByteArray> TimeList;

    CPULoad(const CPULoad &);
    CPULoad & operator= (const CPULoad &);
    TimeList  readTimeList();

private:
    TimeList   m_timeList;
    int        m_load;
    static int m_forcedLoad;
};

#endif // CPULOAD_H