Warning: add_full is deprecated since 1.6.
Sets a function to be called at regular intervals with the given priority.
There is no direct replacement for this API.
The function is called repeatedly until it returns false
, at which point the timeout is automatically destroyed and the
function will not be called again. The notify
function is called when the timeout is destroyed. The first call to the
function will be at the end of the first interval
.
This function is similar to add_full except that it will try to compensate for delays. For example, if
func
takes half the interval time to execute then the function will be called again half the interval time after it finished. In
contrast add_full would not fire until a full interval after the function completes so the delay between calls
would be 1.0 / fps
* 1.5. This function does not however try to invoke the function multiple times to catch up missing frames
if func
takes more than interval
ms to execute.
priority |
the priority of the frame source. Typically this will be in the range between DEFAULT and HIGH. |
fps |
the number of times per second to call the function |
func |
function to call |
data |
data to pass to the function |
notify |
function to call when the timeout source is removed |
the ID (greater than 0) of the event source. |