RtGetSystemTimes

RtGetSystemTimes retrieves an array of system timing information. On a multiprocessor system, values in each of the FILETIME structures will contain system timing information for a given Process core.

Syntax

Copy
BOOL RtGetSystemTimes(
    LPFILETIME lpCoreIdleTime,
    LPFILETIME lpCoreExecuteTime,
    ULONG lpSize
);

Parameters

lpIdleTime

Pointer to the array of FILETIME structure that receives the amount of time that each process core has been idle.

lpExecuteTime

Pointer to the array of FILETIME structure that receives the total amount of time that each process core has spent executing code in Process processes and threads.

lpSize

This parameter specifies the size in bytes of the arrays for the parameters lpIdleTime or lpExecuteTime.

If the lpIdleTime and lpExecuteTime parameters are NULL, this parameter receives the required array size of FILETIME structures in bytes.

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 time units.

First, call this function with the lpIdleTime and lpExecuteTime parameters to NULL to determine maximum array size of FILETIME structures in bytes required.

In the list of arrays with FILETIME information, index 0 is equal to the process number (also 0-based). Index 1 would contain the FILETIME information of the corresponding processor. In a 64-processor system, index 0 through 63 identify Processors 0 through Processor 63.

Requirements

Minimum supported version Header Library

eRTOS 1.0 SDK

RtssApi.h rtkrnl.lib