Calculating CPU usage for the task

It sounds that I wasn’t clear in my question, I meant the task’s CPU usage not the all over CPU usage.