RtGetTimer

RtGetTimer returns the remaining relative time until the next expiration of the specified timer.

Syntax

Copy
BOOL RtGetTimer(
    [in]    HANDLE hTimer,
    [out]   PLARGE_INTEGER pTimeRemaining
);

Parameters

[in] hTimer

A wRTOS-specific handle to the timer.

[out] pTimeRemaining

A pointer to a LARGE_INTEGER structure in which to store the remaining time until expiration.

Return Value

If the function succeeds, it returns TRUE. If invalid parameters are specified, it returns FALSE.

Remarks

RtGetTimer returns the relative amount of time until the specified timer expires. The time is specified in 100 ns units and is written into the user-provided LARGE_INTEGER structure.

Note: If your timer period is close to Real-time subsystem’s HAL timer period, the overhead of Subsystem tick processing may cause a much larger response latency of your timer handling routine (IST). In this case, you should configure a much smaller HAL timer period. For example, if your timer period is 100 us, you should configure HAL period to a smaller value, such as 20 us, depending on your processor frequency. See wRTOS Settings for how to modify the HAL Timer Period.

Requirements

Minimum supported version Header Library

wRTOS 1.0 SDK

RtApi.h

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

See Also: