I want to use the API function GetProcessTimes. I send all running processes to that funktion and want to know the CPUusage.
The problem is that getprocesstimes uses the Filetime Format. I dont know how to handle it. I need a formula that changes the value to percentages.
I use following to get the values:
CreationTime, ExitTime, KernelTime, UserTime: FileTime;
for i:=1 to numberofprocesses do begin
GetProcessTimes(PH, CreationTime, ExitTime, KernelTime, UserTime);
.... //Here a need the formula
I know the number of processes, but I don't know how to handle the values.
Could you help me about the formula to convert the values to get percentages?
My system has two CPUs. I like to view the usage for both CPUs seperatly.