TimerSignalHeartbeat

Sends a signal periodically.

Synopsis

TimerHandle TimerSignalHeartbeat (int32 signal, uint32 seconds, uint32 microseconds)

Description

Creates a timer that repeatedly notifies you by signal at the specified intervals. The timer continues sending notifications on a regular interval until you use TimerSuspend() to temporarily halt it or TimerCancel() to delete.

The Heartbeat support in the TimerServices thread contains logic to prevent drift in the frequency of timer events. Signals are delivered at the specified frequency even if it takes you significant time to respond to each signal event.

The TimerServices thread must be active before calling this function.

Arguments

signal
The signal to send to your task.
seconds
The seconds portion of the frequency.
microseconds
The microseconds portion of the frequency. This value can be larger than 1 million.

Return Value

A TimerHandle (a positive value) on success or a negative error code.

Implementation

Library call implemented in lib3do.lib.

Associated Files

lib3do.lib, timerutils.h

See Also

TimerSignalAtTime,TimerSignalAfterDelay, HZ_TO_USEC