title: Win32: Calculate Thread CPU Utilization in a Multi-Core / Multi-Processor System
body: <p>I am currently working on an MFC application that needs to be CPU-utilization aware. It may have multiple threads at different points in time, but the bulk of the work is accomplished by the main thread. </p>
  
  <p>I am trying to find a way to calculate how much percentage of the CPU this main thread utilizes. However, I am running into some problems as to how exactly to accomplish this in a multi-CPU / multi-Core environment. The problem is that most system calls seems to give system information, whereas I need information specific to the processor on which my main thread is executing.</p>
  
  <p>I have looked at WMI, but it seems to be an overkill for the task. Will GetThreadTimes() work for what I need?</p>