Name
RegisterTimer -- register a new timer (V6.0)
Synopsis
APTR handle = RegisterTimer(lua_State *L, int ms, int oneshot);
Function
This function has to register a new timer that triggers once the time specified in parameter 2 has elapsed. If the third parameter is set to True, Hollywood wants to have a one-shot timer. Otherwise, the timer is expected to regard the time in parameter 2 as an interval time and fire continuously in these intervals.

To make Hollywood run the user callbacks associated with timer events you need to call hw_RunTimerCallback() when a timer has fired. See hw_RunTimerCallback for details.

Hollywood will call FreeTimer() to free timers registered by this function.

Inputs
L
pointer to the lua_State
ms
time in milliseconds
oneshot
True if this timer should fire only once
Results
handle
handle to the timer or NULL in case of an error

Show TOC