servicetalk-concurrent-test-internal/src/main/java/io/servicetalk/concurrent/test/internal/AwaitUtils.java
/**
     * Await a {@link CountDownLatch} while suppressing {@link InterruptedException} until the latch is counted down or
     * the given time duration expires.
     * @param latch the {@link CountDownLatch} to await.
     * @param timeout the timeout duration to await for.
     * @param unit the units applied to {@code timeout}.
     * @return see {@link CountDownLatch#await(long, TimeUnit)}.
     * @deprecated use {@link #await(CountDownLatch, long, TimeUnit)} instead
     */
Await a  CountDownLatch while suppressing  InterruptedException until the latch is counted down or
the given time duration expires.
@param latch the  CountDownLatch to await.
@param timeout the timeout duration to await for.
@param unit the units applied to  timeout.
Await a CountDownLatch while suppressing InterruptedException until the latch is counted down or the given time duration expires . @param latch the CountDownLatch to await . @param timeout the timeout duration to await for . @param unit the units applied to timeout .
@Deprecated
    public static boolean awaitUninterruptibly(CountDownLatch latch, long timeout, TimeUnit unit) {
        final long startTime = System.nanoTime();
        final long timeoutNanos = NANOSECONDS.convert(timeout, unit);
        long waitTime = timeoutNanos;
        boolean interrupted = false;
        try {
            do {
                try {
                    return latch.await(waitTime, NANOSECONDS);
                } catch (InterruptedException e) {
                    interrupted = true;
                }
                waitTime = timeoutNanos - (System.nanoTime() - startTime);
                if (waitTime <= 0) {
                    return true;
                }
            } while (true);
        } finally {
            if (interrupted) {
                Thread.currentThread().interrupt();
            }
        }
    }
@ Deprecated public static boolean awaitUninterruptibly ( CountDownLatch latch , long timeout , TimeUnit unit ) { final long startTime = System . nanoTime ( ) ; final long timeoutNanos = NANOSECONDS . convert ( timeout , unit ) ; long waitTime = timeoutNanos ; boolean interrupted = false ; try { do { try { return latch . await ( waitTime , NANOSECONDS ) ; } catch ( InterruptedException e ) { interrupted = true ; } waitTime = timeoutNanos - ( System . nanoTime ( ) - startTime ) ; if ( waitTime <= 0 ) { return true ; } } while ( true ) ; } finally { if ( interrupted ) { Thread . currentThread ( ) . interrupt ( ) ; } } }
Await a {@link CountDownLatch} while suppressing {@link InterruptedException} until the latch is counted down or
 the given time duration expires.
Await a { @link CountDownLatch } while suppressing { @link InterruptedException } until the latch is counted down or the given time duration expires .