TimerAvailability LightWave® 9.5 Timers can be used to execute code at specified intervals. This interface provides a means of creating one or more interval-based timer instances. Global Call LWTimer *sdkTimer; sdkTimer = global( LWTIMER_GLOBAL, GFUSE_TRANSIENT ); The global function returns a pointer to an LWTimer structure. typedef struct st_LWTimer { void (*timerAdd)(TimerEventProc proc,void *data,unsigned long interval); void (*timerRemove)(TimerEventProc proc,unsigned long interval); } LWTimer;
Event Support When creating a timer instance, you must provide a pointer to a callback function that will be invoked whenever the timer expires. The function has the following prototype:
The Timers return an integer value of either 0 or 1. This Boolean value indicates
to the timer management system whether or not this particular timer instance should
be implicitly removed from the timer list, and from further processing. If a value of
1 is returned, then the timer is removed from the system, and a subsequent call to
Exported Timer Functions timerAdd( proc, data, interval ) timerRemove( proc, interval ) |