// ***
// Pauses all functionality sleeps the thread for specified time
// ***
function sleep(milliseconds)
{
var now = new Date();
var exitTime = now.getTime() + milliseconds;
while (true)
{
now = new Date();
if (now.getTime() > exitTime)
return;
}
}
Very nice - works a treat!
ReplyDeleteThanks mate
ReplyDeleteVery handy, thanks KC!
ReplyDelete