sb.timerSetTimeout
sb.timerSetTimeout(function, timeout)
This function creates a one-shot timer that fires after timeout milliseconds and then executes function
Parameters
| Parameter | Type | Description |
|---|---|---|
function | function | The function to be called when the timer fires. |
timeout | number | The time in milliseconds before the timer should fire. |
Returns
| Type | Description |
|---|---|
string | An 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);
}