Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js sleep

// Sync version
function sleep(sleepDuration){
    var now = new Date().getTime();
    while(new Date().getTime() < now + sleepDuration){ /* do nothing */ } 
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #sleep
ADD COMMENT
Topic
Name
8+3 =