![]() |
|
|
+ Search |
![]()
|
Apr 4th, 2008 20:53
ha mo, Jean-Bernard Valentaten, Colin Fraser, wolfie Macantire,
> No, but if you do not want to use a set TimeOut() function, create
> your own,
> Try
> for (i=0;i<10000;i++) ; // do nothing but waste processor time
But of course this is processor dependent (a 286 will take much longer
than a Pentium 4), so you can alternatively pass the current time to a
var and then check how much time has elapsed since.
Might look like this:
function delay(millis)
{
var now = new Date();
var mil = now.getTime();
while (now.getTime() - mil <= millis) {;}
return;
}
HTH
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com