title: How to retrieve total system CPU usage from Windows in C++?
body: <p>I need to retrieve total CPU usage on the fly for a feedback system to change the behavior based on whether CPU is getting throttled or not. For this, I looked into <code>NtQuerySystemInformation</code> sys call which provides system information at any given time but it seems like this function has been deprecated in the latest versions of Windows since MSDN page says </p>
  
  <blockquote>
    <p>[NtQuerySystemInformation may be altered or unavailable in future
    versions of Windows. Applications should use the alternate functions
    listed in this topic.]</p>
  </blockquote>
  
  <p>Reference: <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms724509(v=vs.85).aspx" rel="nofollow noreferrer">https://msdn.microsoft.com/en-us/library/windows/desktop/ms724509(v=vs.85).aspx</a></p>
  
  <p>Does anyone know what OS versions this call is supported on? Win 7/8/8.1/10? Is there any other way to directly retrieve total CPU usage?</p>