GetProcessTimes function kernel32

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

Retrieves timing information for the specified process.

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

Implementation

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