Javascript sleep
- by fmsf
Is any better way than this function to make a sleep in javascript, or should I just use that function? (taken from here)
function pausecomp(millis)
{
var date = new Date();
var curDate = null;
do { curDate = new Date(); }
while(curDate-date < millis);
}
This is not a dupe of http://stackoverflow.com/questions/758688/sleep-in-javascript I want a real sleep in a middle of a function, not a delay for a piece of code;