try { // put current thread to sleep Thread.sleep( delayInMilliseconds ); } catch ( InterruptedException e ) { out.println( "some other thread woke me prematurely." ) }