1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-07 03:22:33 +01:00
ScreenPlay/ScreenPlaySysInfo/cpu.cpp
2018-11-06 17:00:21 +01:00

37 lines
838 B
C++

#include "cpu.h"
#include <QtQml/qqml.h>
#define STATUS_SUCCESS 0
#define STATUS_INFO_LENGTH_MISMATCH 0xC0000004
CPU::CPU(QObject *parent) : QObject(parent)
{
// signal obj, signal function pointer, slot obj, slot function pointer
connect(&m_updateTimer,&QTimer::timeout,this,&CPU::update);
m_updateTimer.start(m_tickRate);
}
void CPU::update()
{
// long status = 0;
// unsigned long bufSize = c_BufferSize;
// byte* buf = (bufSize > 0) ? new BYTE[bufSize] : nullptr;
// status = c_NtQuerySystemInformation(SystemProcessorPerformanceInformation, buf, bufSize, &size);
// switch (status) {
// case STATUS_INFO_LENGTH_MISMATCH:
// qWarning() << "Warning: Status info length mismatch!";
// break;
// case STATUS_SUCCESS:
// break;
// default:
// break;
// }
}