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

后端 未结 9 972
后悔当初
后悔当初 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:50

    Not directly.

    But you can use a library that abstracts the OS (such as ACE).
    Though this might by a bit heavy if you just want CPU and Memory.

提交回复
热议问题