DiscardAsyncTimer
int DiscardAsyncTimer (int timerID);
Purpose
This function discards the asynchronous timer with the specified timer ID. The function removes the timer from the list of existing timers and stops the timer events from occurring. The timer, thus, ceases to exist.
If the ID is specified as –1, all timers are discarded.
![]() |
Note A call to create or discard an asynchronous timer will not complete (will block) until all outstanding asynchronous callbacks return. |
Parameters
Input | ||
Name | Type | Description |
timerID | int | Specifies the timer ID of the timer to be discarded. If specified as –1, all timers are discarded. |
Return Value
Name | Type | Description | ||||||||||||||||||||||
status | int | Return value indicating whether the function was successful. A negative number indicates that an error occurred.
|
Additional Information
Library: Asynchronous Timers
Include file: toolbox\asynctmr.h
LabWindows/CVI compatibility: LabWindows/CVI 5.0 and later
Example
Refer to toolbox\asyncdem.cws for an example of using the DiscardAsyncTimer function.