1.2.11.4.8 SYS_TIME_DelayIsComplete Function
C
bool SYS_TIME_DelayIsComplete ( SYS_TIME_HANDLE handle )
Summary
Determines if the given delay timer has completed.
Description
This function determines if the requested delay is completed or is still in progress.
Precondition
A delay request must have been created using either the SYS_TIME_DelayMS or SYS_TIME_DelayUS functions.
Parameters
Param | Description |
---|---|
handle | A SYS_TIME_HANDLE value provided by either SYS_TIME_DelayMS or SYS_TIME_DelayUS functions. |
Returns
true - If the delay has completed.
false - If the delay has not completed.
Example
// Check if the delay has expired. if (SYS_TIME_DelayIsComplete(timer) != true) { // Delay has not expired }
Remarks
SYS_TIME_DelayIsComplete must be called to poll the status of the delay requested through SYS_TIME_DelayMS or SYS_TIME_DelayUS.
SYS_TIME_DelayIsComplete must not be used to poll the status of a periodic timer. Status of a periodic timer may be polled using the SYS_TIME_TimerPeriodHasExpired routine.