View Single Post
  #2 (permalink)  
Old 05-31-2007, 05:46 PM
Valeriano Valeriano is offline
Member
 
Join Date: May 2007
Posts: 10
Valeriano is on a distinguished road
It is already available in java.lang package. Try following code:

Code:
try{ //do what you want to do before sleeping Thread.currentThread().sleep(1000);//sleep for 1000 ms //do what you want to do after sleeptig } catch(ItrerruptedException ie){ //If this thread was intrrupted by nother thread }
Reply With Quote