title: get cpu time of an external process and it children while it still running on OS X
body: <p>On linux I can use <code>/proc</code> as stated in <a href="https://stackoverflow.com/questions/1420426/calculating-cpu-usage-of-a-process-in-linux">How to calculate the CPU usage of a process by PID in Linux from C?</a> to get the cpu time of a  process and it children. </p>
  
  <p>How would I do this on OS X?</p>