Funktionreferenz


_WinAPI_GetProcessTimes


Retrieves timing information for the specified process

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

Parameter

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

Rückgabewert

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.

Bemerkungen

None.

Siehe auch

Suche nach GetProcessTimes in der MSDN Bibliothek.

Beispiel

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

Global $aFT, $tFT, $tST, $ID = ProcessExists('SciTE.exe')

If $ID Then
    $aFT = _WinAPI_GetProcessTimes($ID)
    $tFT = _Date_Time_FileTimeToLocalFileTime(DllStructGetPtr($aFT[0]))
    $tST = _Date_Time_FileTimeToSystemTime(DllStructGetPtr($tFT))
    ConsoleWrite('SciTE wurde um ' & _WinAPI_GetTimeFormat(0, $tST) & " gestartet"& @CRLF)
EndIf