await

Waits for the CountDownLatch to reach zero, or for the specified duration to elapse.

Return

true if the CountDownLatch reached zero within the specified duration, false if the waiting time elapsed before the count reached zero.

Parameters

duration

the maximum time to wait, specified as a Duration.