Sleep function in java?
Posted: 2003-01-02 07:44:33
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?