How to calculate the CPU usage of a process by PID in Linux from C? How to calculate the CPU usage of a process by PID in Linux from C? c c