
Chapter 12 Device Logic (Pawn)
native rM2M_TimerAddExt(funcidx, bool:cyclic, time);
Generates a new ms timer
Parameter
Explanation
funcidx
Index of the public function that should be called up following expiry of the timer
Type of function: public func();
cyclic
Setting for the behaviour following expiry of the timer interval:
true: The timer must be restarted following expiry of the interval.
false: The timer is stopped following expiry of the interval.
time
Timer interval in milliseconds (max. 60,000 ms)
Note:
By setting the interval to 0ms, a timer can be generated for which the call
back function is called up immediately after the current code block (e.g. main
function) is executed. However, only single shot timers (i.e. the timer is stopped
upon expiry of an interval) with an interval of 0ms may be initialised.
Explanation
Return value
l
OK, if successful
l
ERROR, if one of the following errors occurs
l
No valid index was transferred.
l
An interval of 0ms was specified and the timer should be restarted
automatically upon expiry of the timeout (i.e. cyclical 0ms timer).
l
Internal error
l
No additional timers can be created (maximum number reached).
l
< OK, if another error occurs (see "Return codes for general purposes" in
chapter "Constants" on page 84).
native rM2M_TimerRemoveExt(funcidx);
Removes a ms timer
Parameter
Explanation
funcidx
Index of the public function of the timer that should be removed
Type of function: public func();
Explanation
Return value
l
OK, if successful
l
ERROR, if no valid index was transferred or in the event of an internal error
l
< OK, if another error occurs (see "Return codes for general purposes" in
chapter "Constants" on page 84).
Rev. 01
89