guava/src/com/google/common/util/concurrent/ServiceManager.java
@SuppressWarnings("GoodTime") // should accept a java.time.Duration
  public void awaitStopped(long timeout, TimeUnit unit) throws TimeoutException {
    state.awaitStopped(timeout, unit);
  }
@SuppressWarnings("GoodTime") // should accept a java.time.Duration
  public void awaitStopped(long timeout, TimeUnit unit) throws TimeoutException {
    state.awaitStopped(timeout, unit);
  }
Waits for the all the services to reach a terminal state for no more than the given time. After
this method returns all services will either be {@linkplain Service.State#TERMINATED
terminated} or {@linkplain Service.State#FAILED failed}.

@param timeout the maximum time to wait
@param unit the time unit of the timeout argument
@throws TimeoutException if not all of the services have stopped within the deadline