Looking for Win32 API functions, C++ or Delphi sample code that tells me the CPU usage (percent and/or total CPU time) of a thread (not the total for a process). I have the thread ID.
I know that Sysinternals Process Explorer can display this information, but I need this information inside my program.
You must use these functions to get the cpu usage per thread and process.
GetThreadTimes (Retrieves timing information for the specified thread.)
GetProcessTimes (Retrieves timing information for the specified process.)
GetSystemTime (Retrieves the current system date and time. The system time is expressed in Coordinated Universal Time UTC)
Here a excellent article from Dr. Dobb's Win32 Performance Measurement Options
Bye.