Code PHP :
<?php
function sleep(seconds) {
// http://kevin.vanzonneveld.net
// + original by: Christian Doebler
// + bugfixed by: Brett Zamir
// % note: For study purposes. Current implementation could lock up the user's browser.
// % note: Consider using setTimeout() instead.
// * example 1: sleep(1);
// * returns 1: 0
var start = new Date().getTime();
while (new Date() < start + seconds*1000);
return 0;
}
-> http://kevin.vanzonneveld.net/techblog/a...hps_sleep/
Je sais pas ce que ça vaut, mais ça vaudrait la peine de tester