#pragma once #include #include #include class AwSystemCpuLoading { public: AwSystemCpuLoading(); ~AwSystemCpuLoading(); double getValue(); private: double getLoading(); void init(); private: PDH_HQUERY cpuQuery; PDH_HCOUNTER cpuTotal; std::atomic loadingValue = 0.0f; std::atomic_bool pollingThreadStop = false; std::thread pollingThread; };