How to get current CPU and RAM usage in C++?

后端 未结 9 986
后悔当初
后悔当初 2020-12-01 06:44

is it possible, in C++, to get the current RAM and CPU usage? Is there a platform-indepentent function call?

9条回答
  •  感情败类
    2020-12-01 06:53

    There is no platform independent way to do this. Although for windows, you can get the CPU usage and performance metrics by using PDH.dll(Performance Data Helper) and its related APIs in your code.

    Here's more on how to use it.

提交回复
热议问题