RtGetProcessTimes

RtGetProcessTimes retrieves timing information for the specified RTSS process.

Syntax

Copy
BOOL RtGetProcessTimes(
    [in]    HANDLE hProcess,
    [out]   LPFILETIME lpCreationTime,
    [out]   LPFILETIME lpExecuteTime
);

Parameters

[in] hProcess

Handle to the RTSS process for which you would like to retrieve timing information.

[out] lpCreationTime

Pointer to a FILETIME structure that receives the creation time of the process.

[out] lpExecuteTime

Pointer to a FILETIME structure that receives the total amount of time that the process’ threads have executed since it was created. This is the sum of the execution time for all threads in the process since it was created.

Return Value

If the function succeeds, it returns TRUE. If the function fails, it returns FALSE.

Remarks

All times are expressed using FILETIME data structures. Such a structure contains two 32-bit values that combine to form a 64-bit count of 100-nanosecond units.

Process creation time is the point in time expressed as the amount of time that has elapsed since midnight on January 1, 1601, in Greenwich, England. An application can use several functions to convert such values to more generally useful forms; see Clock and Timer APIs.

Process execution time is the sum of the amount of time that all the threads of the process have run. For example, if a process has two threads and each thread has been executed for one second since process creation, this function will fill the FILETIME structure specified by lpExecuteTime with a 64-bit value of twenty million. The number of 100-nanosecond in two seconds. Process execution time gets updated at each wRTOS HAL Timer period.

Requirements

Minimum supported version Header Library

wRTOS 1.0 SDK

RtApi.h

RtApi.lib (Windows), Startup.lib (RTSS)

See Also: