BOOL osResetTimer( HANDLE Handle );
The handle to the timer object to be reset.
Returns TRUE on success or FALSE on failure. To retrieve extended error information, call the osGetLastError function.
This function resets the timer without stopping its operation.
A timer is initialized and started using the osSetTimer function, which defines the duration of a single timing cycle. During this cycle, the timer remains in the non-signaled state. Upon the completion of the cycle, the timer transitions back to the signaled state.
Timing cycles may be repeated for a specified number of iterations. After each cycle concludes and the timer is reset, the internal pass counter is incremented.
To initiate a subsequent cycle, the timer must be reset. This occurs either manually via the osResetTimer function or automatically, depending on the timer's configuration. Manual-reset timers require an explicit call to osResetTimer to start the next cycle. In contrast, auto-reset timers begin the next cycle immediately after the previous one expires. When multiple tasks are pending on an auto-reset timer, only the highest-priority task is released at the end of each cycle.
If osResetTimer is invoked while a cycle is currently in progress, the cycle is restarted from its beginning. The pass counter is only incremented upon the successful expiration of a full cycle. A cycle can be restarted indefinitely; however, the function will fail if it is called on a timer that has already stopped. In such instances, the system sets the last error code to ERR_TIMER_NOT_STARTED.
For additional details regarding timer behavior and management, please refer to the Timer Objects section.
This function is available only when the OS_USE_TIMER configuration constant is set to 1.
| Version: | 1.0 |
|---|---|
| Header file: | OS_Timer.h (include OS_API.h) |
| See also: | BOOL, FALSE, HANDLE, osCreateTimer, osGetLastError, osSetTimer, timers, TRUE |