TimerMsgHeartbeatVBL
Sends a message periodically based on VBLs.
Synopsis
TimerHandle TimerMsgHeartbeatVBL (Item msgport, uint32 fields, uint32 userdata1, uint32 userdata2)
Description
Creates a timer that repeatedly notifies you by message after the specified number of VBLs have occurred. The timer continues sending notifications on a regular interval until you use TimerSuspend()
to temporarily halt it or TimerCancel()
to delete it.
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
- msgport
- Port to which the notification message is sent.
- fields
- Number of VBLs to occur between each event.
- userdata1
- Value passed back to you in the msg_DataPtr field of the notification message.
- userdata2
- Value passed back to you in the msg_DataSize field of the notification message.
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
TimerMsgAfterDelayVBL
, TimerMsgAtTimeVBL