retard dans JavaScript
setTimeout(function() {
//your code here
}, 1000);
Tender Toad
setTimeout(function() {
//your code here
}, 1000);
//code before the pause
setTimeout(function(){
//do what you need here
}, 2000);
var delayInMilliseconds = 1000; //1 second
setTimeout(function() {
//your code to be executed after 1 second
}, delayInMilliseconds);
//single event i.e. alarm, time in milliseconds
var timeout = setTimeout(function(){yourFunction()},10000);
//repeated events, gap in milliseconds
var interval = setInterval(function(){yourFunction()},1000);
setTimeout(function () {
//to do..
}, 1000);
const syncWait = ms => {
const end = Date.now() + ms
while (Date.now() < end) continue
}