RtGetProcessTimes

RtGetProcessTimes retrieves timing information for the specified RTSS process.

NOTE: RtGetProcessTimes is only supported in the RTSS environment. It cannot be called from a Windows application linked to RTX64.

Syntax

BOOL RtGetProcessTimes(
    HANDLE hProcess,
    LPFILETIME lpCreationTime,
    LPFILETIME lpExecuteTime
);

Parameters

hProcess

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

lpCreationTime

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

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

Returns TRUE if the function succeeds; returns FALSE if the function fails.

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 at Greenwich, England. There are several functions that an application can use to convert such values to more generally useful forms; see Clock and Timer APIs.

Process execute 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 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-nanoseconds in two seconds. Process execute time gets updated at each RTX64 HAL Timer period.

Requirements

Minimum Supported Version RTX64 3.5
Header RtApi.h
Library RtAPI.lib(Windows), Rtx_Rtss.lib(RTSS)

See Also: