private void waitFor ( long millis ) { Object lock = new Object ( ) ; synchronized ( lock ) { try { lock . wait ( millis ) ; } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; // good practice if don't throw getLog ( ) . warn ( "Spuriously interrupted while waiting for " + millis + "ms" , e ) ; } } }
Stop program execution for nn millis .