DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Javascript - Sleep
// Effettuare uno sleep dello script di uno script
function pause(millisecondi)
{
var now = new Date();
var exitTime = now.getTime() + millisecondi;
while(true)
{
now = new Date();
if(now.getTime() > exitTime) return;
}
}






Comments
Snippets Manager replied on Mon, 2012/05/07 - 2:25pm
Snippets Manager replied on Fri, 2006/07/07 - 11:59pm