Hi,
I need to know the % CPU is using a process (like the taskbar).
How can I do it?
Thanks in advance.
Process CPU Time
Hello,
sorry for the late reply.
There are 2 possibilities for doing this: You can get access to the OS's performance counters. That's quite ugly to do, but works. Alternatively you can use "GetProcessTimes" (or "IProcess.GetTimes"). Call this twice with a delay in between and then you can see the difference between the reported times and calculate the CPU consumption from that information.
sorry for the late reply.
There are 2 possibilities for doing this: You can get access to the OS's performance counters. That's quite ugly to do, but works. Alternatively you can use "GetProcessTimes" (or "IProcess.GetTimes"). Call this twice with a delay in between and then you can see the difference between the reported times and calculate the CPU consumption from that information.