OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
SystemInformation.h
Go to the documentation of this file.
1
2#pragma once
3
6
7#include <pdh.h>
8
9#include <string>
10
11#undef GetObject
12
13#pragma warning (disable:4251)
14
15namespace ot {
16
20 public:
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}
#define OT_SYS_API_EXPORT
Definition SystemAPIExport.h:11
Definition SystemInformation.h:19
Definition Connector.h:8