Sleep function in java?

If you need help on how to use the program
Post Reply
Twink
Posts: 92
Joined: 2002-08-01 01:40:12

Sleep function in java?

Post by Twink »

I was working on my template the other day trying to fix 0.8 to work on the net I figured all I needed to do was loop untill the xml is fully loaded so I added a few lines to do this and it worked, however both Mozilla and IE popup a message saying do you want to stop this script as it's just looping and taking alot of proccessor every few seconds till the page is fully loaded, I figured if I add a sleep command, it won't be constantly using the cpu cycles to check if it's loaded, and can put more effort into loading it, and eliminate the popups, however I can't seem to find a sleep function in java, just a timer which lets me call a function on a certain timeout, which doesn't really do what I want (well I can't think of a way to implement it), does anyone know of a way of sleeping for a while that can be used in a while loop?
antp
Site Admin
Posts: 9639
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

You mean in Javascript, not Java :D
Twink
Posts: 92
Joined: 2002-08-01 01:40:12

Post by Twink »

yes, sorry, meant javascript
Post Reply