Skip to main content
Version: 9.0.3

sb.timerSetTimeout

sb.timerSetTimeout(function, timeout)

This function creates a one-shot timer that fires after timeout milliseconds and then executes function

Parameters​

ParameterTypeDescription
functionfunctionThe function to be called when the timer fires.
timeoutnumberThe time in milliseconds before the timer should fire.

Returns​

TypeDescription
stringAn id for the timer.

Example​

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

// Call cbFunc after 1 second
function cbSetTimeout() {
idval = sb.timerSetTimeout(cbFunc, 1000);
}