@WillCloseWhenClosed
    public static void sleepFor(long timeout, TimeUnit unit) {
        try {
            unit.sleep(timeout);
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
        }
    }
@ WillCloseWhenClosed public static void sleepFor ( long timeout , TimeUnit unit ) { try { unit . sleep ( timeout ) ; } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; } }
Interruptible sleep of the current thread

<b>Will interrupt the thread if InterruptedException occurs</b>

@param timeout with unit, the maximum length of time that callers are willing to wait
@param unit with timeout, the maximum length of time that callers are willing to wait

@see TimeUnit#sleep(long)