sb.timerSetInterval

sb.timerSetInterval(function, interval)

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

Parameters:
    function         The function to be called when the timer fires
    interval         The time in milliseconds of how often the timer should fire

Returns:
    An 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);
}
Was this article helpful?
0 out of 0 found this helpful