Function Reference


_WinAPI_GetProcessTimes

Retrieves timing information for the specified process

#include <WinAPIProc.au3>
_WinAPI_GetProcessTimes ( [$iPID = 0] )

Parameters

$iPID [optional] The PID of the process. Default (0) is the current process.

Return Value

Success: The array that contains the following information:
[0] - $tagFILETIME structure that contains the creation time of the process.
[1] - The time that the process has executed in kernel mode, in 100-nanosecond time units.
[2] - The time that the process has executed in user mode, in 100-nanosecond time units.
Failure: Sets the @error flag to non-zero, call _WinAPI_GetLastError() to get extended error information.

See Also

Search GetProcessTimes in MSDN Library.

Example

#include <Date.au3>
#include <WinAPILocale.au3>
#include <WinAPIProc.au3>

Local $aFT, $tFT, $tST, $iID = ProcessExists('SciTE.exe')

If $iID Then
        $aFT = _WinAPI_GetProcessTimes($iID)
        $tFT = _Date_Time_FileTimeToLocalFileTime($aFT[0])
        $tST = _Date_Time_FileTimeToSystemTime($tFT)
        ConsoleWrite('!SciTE was run at: ' & _WinAPI_GetTimeFormat(0, $tST) & @CRLF)
EndIf