by jesse

What is the easiest way to pause execution of a program in java, without threads?

well, the title lies, it does actualy use threads, but the class does not have to extend java.lang.thread, or anything else. so here it is: Thread.currentThread().sleep(int); and now, a brief explanation, Thread.currentThread() returns an instance of the caller, as a thread, even when the caller isnt a thread, its a bagel, or an applet. you could just as easily use stop, or pause instead of sleep also.

 


 
Read more of   The Yak's Frequently Questioned Answers   (mod.2008-11-08)

430.   How can I migrate my encrypted gpassman files to ascii?   [jake/2006-05-20]
378.   What is the meaning of MSD in relation to OpenPGP/GnuPG/PGP?   [jake/2003-09-22]
376.   What are three very useful online dictionaries?   [jake/2003-09-22]
336.   What is UNICUM? (Mi van az Unicum?)   [strick/2002-11-24]
314.   How can you talk to deaf people on the phone? (Thanks Mr. Jeff Young)   [jake/2002-05-11]
306.   What are the niftiest unicode alphabets?   [strick/2005-11-27]
305.   Why was strick's workstation at Versant named GWARN?   [strick/2002-01-23]
272.   If you were held captive, and your captor demanded you to mix a Big Dave's Drawersdropper or else… what do you do?!!!   [kurt/2001-09-05]
252.   How can I turn an Indigo into an apache based webcam?   [vonguard/2001-06-29]
232.   Where can i find a stamp sized ethernet web server for (barely)less than $100?   [sidd/2001-05-30]
200.   where can i find a good resource for radio repeaters in norther california   [jesse/2001-03-13]
150.   Where can I find information on the Sony Magic Cap PDA?   [rupe/2000-12-08]
137.   where can i find docs for radioshack scanners?   [jesse/2000-10-20]
113.   Why is my Python script returning a built in operation error?   [rupe/2000-07-21]
86.   How do those little Anti-Shoplifting tags work?   [strick/2000-05-02]
78.   Where can I find the latest copy of nmap?   [rupe/2000-04-22]
68.   What are Nana's rats names?   [nana/2000-02-28]
31.   Was Ross at Kevin Mitnick's release?   [strick/2000-01-23]
17.   How can I make a didgeridoo for traveling?   [ult/2002-04-20]