OpenTwin
0.1
OpenTwin
Loading...
Searching...
No Matches
SystemInformation.h
Go to the documentation of this file.
1
2
#pragma once
3
4
#include "
OTSystem/SystemAPIExport.h
"
5
#include "
OTSystem/SystemTypes.h
"
6
7
#include <pdh.h>
8
9
#include <string>
10
11
#undef GetObject
12
13
#pragma warning (disable:4251)
14
15
namespace
ot
{
16
19
class
OT_SYS_API_EXPORT
SystemInformation
{
20
public
:
21
SystemInformation
();
22
virtual
~SystemInformation
();
23
25
void
initialize();
26
28
void
getGlobalCPUAndMemoryLoad(
double
& cpuLoad,
double
& memoryLoad);
29
31
void
getCurrentProcessCPUAndMemoryLoad(
double
& cpuLoad,
double
& memoryLoad);
32
34
std::string getBuildInformation();
35
36
private
:
37
bool
m_initialized;
38
PDH_HQUERY m_cpuQuery;
39
PDH_HCOUNTER m_cpuTotal;
40
ULARGE_INTEGER m_lastCPU, m_lastSysCPU, m_lastUserCPU;
41
int
m_numProcessors;
42
HANDLE m_self;
43
};
44
}
SystemAPIExport.h
OT_SYS_API_EXPORT
#define OT_SYS_API_EXPORT
Definition
SystemAPIExport.h:11
SystemTypes.h
ot::SystemInformation
Definition
SystemInformation.h:19
ot
Definition
Connector.h:8
Libraries
OTSystem
include
OTSystem
SystemInformation.h
Generated by
1.10.0