Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function wait(ms){
- var start = new Date().getTime();
- var end = start;
- while(end < start + ms) {
- end = new Date().getTime();
- }
- }
- console.log('before');
- wait(7000); //7 seconds in milliseconds
- console.log('after');
Add Comment
Please, Sign In to add comment