References: https://stackoverflow.com/questions/1420426/how-to-calculate-the-cpu-usage-of-a-process-by-pid-in-linux-from-c [For getting an idea about how to calculate the CPU usage of a process]