@ Weight ( Weight . Unit . VARIABLE ) public static boolean silentSleep ( final long milliseconds ) { boolean result = true ; try { Thread . sleep ( milliseconds ) ; } catch ( InterruptedException ex ) { result = false ; Thread . currentThread ( ) . interrupt ( ) ; } return result ; }
Just suspend the current thread for defined interval in milliseconds .