TimerRestart

Restarts a timer using current values.

Synopsis

Err TimerRestart (TimerHandle thandle)

Description

This function restarts a timer using the same time values as the last time the timer was active. If the timer was suspended, this reactivates it. If the timer was active, this stops the current action and restarts the timer. This can be used to start a new delay even if the old one hadn't triggered yet. It can also be used to re-sync a heartbeat timer to some external event.

If an event had occurred for this timer and a notification message was sent, this function withdraws the notification message from your port. If you had already received the message but not yet replied to it, the timer is still restarted properly. In other words, you can respond to a timer event message by restarting the timer that sent the message, and you can safely do so before replying to the message.

Arguments

thandle
Handle for a timer created by one of the TimerMsg or TimerSignal functions.

Return Value

Zero on success or a negative error code.

Implementation

Library call implemented in lib3do.lib.

Associated Files

lib3do.lib, timerutils.h

See Also

TimerReset