Friday, October 22, 2010

Laura Gemser Free Film

JavaScript function

Since I have asked several colleagues now and then I do not always want to send emails, attached a small function to delay the execution of a JavaScript program.

The call is then

sleep (ms);

where "ms" is the number of milliseconds to sleeping.

Here the function:


function sleep (ms) {var
beginning = (new Date ()) getTime ();
var end = start + ms;
. while ((new Date ()). getTime ()} < ende){};

0 comments:

Post a Comment