hilo de sueño JavaScript

var millisecondsToWait = 500;
setTimeout(function() {
    // Whatever you want to do after the wait
}, millisecondsToWait);
Lovely Lynx