Posted By

whitetiger on 11/09/06


Tagged

http javascript js time image html script images web sleep


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

Memphys
shachi
vali29


Javascript - Sleep


 / Published in: JavaScript
 

  1. function pause(millisecondi)
  2. {
  3. var now = new Date();
  4. var exitTime = now.getTime() + millisecondi;
  5.  
  6. while(true)
  7. {
  8. now = new Date();
  9. if(now.getTime() > exitTime) return;
  10. }
  11. }

Report this snippet  

You need to login to post a comment.