
Zitat von
Luckie:
1. Gibt der Code van Basilikum an wie viel CPU-
Zeit der Prozess verbraucht und nicht die Auslastung in Prozent.
GetProcessTimes
Zitat:
lpKernelTime
[out] Pointer to a FILETIME structure that receives the amount of time that the process has executed in kernel mode. The time that each of the threads of the process has executed in kernel mode is determined, and then all of those times are summed together to obtain this value.
lpUserTime
[out] Pointer to a FILETIME structure that receives the amount of time that the process has executed in user mode. The time that each of the threads of the process has executed in user mode is determined, and then all of those times are summed together to obtain this value.
1. stimmt nicht: GetProcessTimes liefert tatsächlich "nur" die verbratene CPU-Zeit... diese wird jedoch mit der Division durch die verstrichenen Ticks mit der "echten" Zeit in Relation gebracht, und ergibt so den prozentualen Anteil der Zeit, die der Process während der letzen Berechnungsperiode tatsächlich den CPU beansprucht hat... bei CPU-Zeit = verstrichene Ticks => 100%, bei CPU-Zeit = 0 => 0%