GetThreadTimes function kernel32

Win32Result<bool> GetThreadTimes(
  1. HANDLE hThread,
  2. Pointer<FILETIME> lpCreationTime,
  3. Pointer<FILETIME> lpExitTime,
  4. Pointer<FILETIME> lpKernelTime,
  5. Pointer<FILETIME> lpUserTime,
)

Retrieves timing information for the specified thread.

To learn more, see learn.microsoft.com/windows/win32/api/processthreadsapi/nf-processthreadsapi-getthreadtimes.

Implementation

Win32Result<bool> GetThreadTimes(
  HANDLE hThread,
  Pointer<FILETIME> lpCreationTime,
  Pointer<FILETIME> lpExitTime,
  Pointer<FILETIME> lpKernelTime,
  Pointer<FILETIME> lpUserTime,
) {
  final result_ = GetThreadTimes_Wrapper(
    hThread,
    lpCreationTime,
    lpExitTime,
    lpKernelTime,
    lpUserTime,
  );
  return Win32Result(value: result_.value.i32 != FALSE, error: result_.error);
}