1.2.11.4.19 SYS_TIME_TimerDestroy Function
C
SYS_TIME_RESULT SYS_TIME_TimerDestroy ( SYS_TIME_HANDLE handle)
Summary
Destroys/deallocates a software timer instance.
Description
This function deletes and deallocates a software timer instance, stopping its counter and releasing the associated resources.
Precondition
The SYS_TIME_Initialize and a valid handle to the software timer to be destroyed must be available.
Parameters
Param | Description |
---|---|
handle | Handle to a software timer instance. |
Returns
SYS_TIME_SUCCESS - If the given software was successfully destroyed.
SYS_TIME_ERROR - If an error occured or the given handle was invalid.
Example
// "timer" is the handle to the software timer to be destroyed. if (SYS_TIME_TimerDestroy(timer) != SYS_TIME_SUCCESS) { // Handle Error }
Remarks
Released timer resources can be reused by other clients. Single shot timers are auto destroyed on expiry. Calling SYS_TIME_DelayIsComplete auto destroys the delay timer if it has expired.