Returns accounting information about a thread.
Syntax
typedef struct tagThreadAccounting {
RTHANDLE OwnerProcess;
RTHANDLE NextThread;
WORD AccountingState;
WORD UsecsPerTick;
DWORD CreateTimeLo;
DWORD CreateTimeHi;
DWORD ElapsedTimeLo;
DWORD ElapsedTimeHi;
DWORD TotalTicksSinceCallLo;
DWORD RunningTicksSinceCallLo;
DWORD TotalRunningTicksLo;
DWORD TotalRunningTicksHi;
} THREADACCOUNTING, far *LPTHREADACCOUNTING;
Fields
OwnerProcess
- The RT handle for the process that contains the target thread.
NextThread
- Next thread on the system thread list, which allows easy scanning of all the threads in the system.
AccountingState
- If 0, only the fields up through UsecsPerTick are valid. If non-zero, all fields in the structure are valid.
UsecsPerTick
- The number of microseconds that each accounting tick represents. On Pentium systems the processor time stamp counter is used as the timebase. The PentiumTicksPerMicrosecond value stored in the system is used to calculate the timers to the nearest microsecond. On non-Pentium systems the value of the system system timer tick for the accounting tick interval.
CreateTimeLo
- The low 32 bits of the target thread's creation time, as measured in accounting ticks.
CreateTimeHi
- The high 32 bits of the target thread's creation time, as measured in accounting ticks.
ElapsedTimeLo
- The low 32 bits of the time that has elapsed since the target thread was created, as measured in accounting ticks.
ElapsedTimeHi
- The high 32 bits of the time that has elapsed since the target thread was created, as measured in accounting ticks.
TotalTicksSinceCallLo
- The low 32 bits of the elapsed time since the last call to GetRtThreadAccounting for this thread, as measured in accounting ticks.
RunningTicksSinceCallLo
- The low 32 bits of the amount of time the thread has run since the last call to GetRtThreadAccounting for this thread, as measured in accounting ticks.
TotalRunningTicksLo
- The low 32 bits of the amount of time the thread has run since its creation, as measured in accounting ticks.
TotalRunningTicksHi
- The high 32 bits of the amount of time the thread has run since its creation, as measured in accounting ticks.
See Also