I need a java loop that will run for 2 minutes then stop.
Anyone care to help with the code please?
maybe a sleep() for 2 minutes function will work better?
aah, don't think I can sleep it since the program spawns many other threads from within, if I use sleep(), it will effectively STOP the entire program...Originally Posted by sshakari
I simply want to RUN for 2 minutes and then stop =)
In the absence of OS support of an external timer interrupt, the normal procedure is to launch a thread that does nothing but sleep. When sleep expires, post a bit accessible from the other threads. Those other threads check the bit as appropriate.Originally Posted by fordfasterr