Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to pause js execution

function sleep(miliseconds) {
   const currentTime = new Date().getTime();

   while (currentTime + miliseconds >= new Date().getTime()) {
   }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pause #js #execution
ADD COMMENT
Topic
Name
6+7 =