public static boolean pauseCurrentThread ( long iTime ) { try { if ( iTime <= 0 ) iTime = Long . MAX_VALUE ; Thread . sleep ( iTime ) ; return true ; } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; return false ; } }
Pauses current thread until iTime timeout or a wake up by another thread .