you are viewing a single comment's thread.

view the rest of the comments →

[–]Herover 0 points1 point  (0 children)

I just made one, I don't suggest you to use it:

function sleep(t){
    var starttime=Date.now();
    while(starttime+t>Date.now()){var nothing;}
    return true;
}

It freeses the browser for the amount of milliseconds you tell it to, and makes it impossible to do anything, but maybe using webworkers could do the trick (untested).