Files
Stacer/stacer-core/Info/cpu_info.h
Oğuzhan İnan 82247ac648 stacer native
2017-08-23 14:49:45 +03:00

30 lines
486 B
C++

#ifndef CPUINFO_H
#define CPUINFO_H
#include <QObject>
#include <QDebug>
#include <QVector>
#include "Utils/file_util.h"
#define PROC_CPUINFO "/proc/cpuinfo"
#define PROC_STAT "/proc/stat"
#include "stacer-core_global.h"
class STACERCORESHARED_EXPORT CpuInfo : public QObject
{
Q_OBJECT
public:
CpuInfo();
quint8 getCpuCoreCount();
QList<int> getCpuPercents();
private:
int getCpuPercent(QList<double>cpuTimes, int processor = 0);
};
#endif // CPUINFO_H