Skip to main content
Version: 9.0.2

sb.timerSetInterval

sb.timerSetInterval(function, interval)

This function creates a repeating timer which fires every "interval" milliseconds and then executes "function"

Parameters

ParameterTypeDescription
functionfunctionThe function to be called when the timer fires.
intervalnumberThe time in milliseconds of how often the timer should fire.

Returns

TypeDescription
stringAn id for the timer.

Example

var idval;
function cbFunc() {
print("CB FUNC HAS BEEN CALLED");
}

//Call cbFunc every 2 seconds
function cbSetInterval() {
idval = sb.timerSetInterval(cbFunc, 2000);
}