Allow void return type in timer callbacks (#1916)
This commit is contained in:
parent
693e584dcd
commit
850f96b986
@ -54,17 +54,36 @@ typeset Timer
|
|||||||
* @param data Handle or value passed to CreateTimer() when timer was created.
|
* @param data Handle or value passed to CreateTimer() when timer was created.
|
||||||
* @return Plugin_Stop to stop a repeating timer, any other value for
|
* @return Plugin_Stop to stop a repeating timer, any other value for
|
||||||
* default behavior.
|
* default behavior.
|
||||||
|
* Ignored for non-repeating timers (use void return type).
|
||||||
*/
|
*/
|
||||||
function Action(Handle timer, any data);
|
function Action(Handle timer, any data);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the timer interval has elapsed.
|
||||||
|
* For repeating timers, use the callback with return value.
|
||||||
|
*
|
||||||
|
* @param timer Handle to the timer object.
|
||||||
|
* @param data Handle or value passed to CreateTimer() when timer was created.
|
||||||
|
*/
|
||||||
|
function void(Handle timer, any data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the timer interval has elapsed.
|
* Called when the timer interval has elapsed.
|
||||||
*
|
*
|
||||||
* @param timer Handle to the timer object.
|
* @param timer Handle to the timer object.
|
||||||
* @return Plugin_Stop to stop a repeating timer, any other value for
|
* @return Plugin_Stop to stop a repeating timer, any other value for
|
||||||
* default behavior.
|
* default behavior.
|
||||||
|
* Ignored for non-repeating timers (use void return type).
|
||||||
*/
|
*/
|
||||||
function Action(Handle timer);
|
function Action(Handle timer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the timer interval has elapsed.
|
||||||
|
* For repeating timers, use the callback with return value.
|
||||||
|
*
|
||||||
|
* @param timer Handle to the timer object.
|
||||||
|
*/
|
||||||
|
function void(Handle timer);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user