setTimeout
Sets a timeout for a function to run.
Description
setTimeout(function(), delay): void
It allows users to execute callbacks after a period of time expressed in milliseconds.
Note: This function works similarly to the setTimeout() function in JavaScript, you can read about it here.
Parameters
function: function
The reference to the callback function
delay: integer
The time of delay expressed in milliseconds.
Return values
None
Example
The example code below calls a function dump(test) after 1000 ms delay.
vcc.setTimeout(function () {
dump('test');
}, 1000);
Comments
Can’t find what you need? Use the comment section below to connect with others, get answers from our experts, or share your ideas with us.
There are no comments yet.