title: Get Current Process CPU Usage Linux C
body: <p>I'd like to get the specific CPU Usage of a process under Linux in C++.
  However, apart from reading</p>
  
  <pre><code>/proc/stat
  </code></pre>
  
  <p>I don't know how to do that.</p>
  
  <p>If I read this file, then I don't know how I can't get the CPU usage of my current process when I launch the program ...</p>
  
  <p>I want to get the CPU usage of the program I'm running, do you have any clue on how to do it ?
  I've seen complex solution on the site and I haven't understood them all ... I just need a direction.</p>
  
  <p>It seems my /proc/pid/stat file isn't changing after sleep(2), is that normal ?</p>