Click or drag to resize
Xcalibur Systems LLC Logo

ProcessHelperGetProcessTimes Method

Retrieves timing information for the specified process.

GetProcessTimes function


Namespace: Xcalibur.NativeMethods.V2.Processes
Assembly: Xcalibur.NativeMethods.V2 (in Xcalibur.NativeMethods.V2.dll) Version: 1.0.1.0
Syntax
[DllImportAttribute("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
public static bool GetProcessTimes(
	IntPtr handle,
	out long creation,
	out long exit,
	out long kernel,
	out long user
)

Parameters

handle  IntPtr
A handle to the process whose timing information is sought. The handle must have the or access right.
creation  Int64
A pointer to a FILETIME structure that receives the creation time of the process.
exit  Int64
A pointer to a FILETIME structure that receives the exit time of the process. If the process has not exited, the content of this structure is undefined.
kernel  Int64
A 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.
user  Int64
A 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. Note that this value can exceed the amount of real time elapsed (between creation and exit) if the process executes across multiple CPU cores.

Return Value

Boolean
If the function fails, the return value is zero. To get extended error information, call .
See Also