android/guava/src/com/google/common/util/concurrent/FluentFuture.java
@GwtIncompatible // ScheduledExecutorService
  @SuppressWarnings("GoodTime") // should accept a java.time.Duration
  public final FluentFuture<V> withTimeout(
      long timeout, TimeUnit unit, ScheduledExecutorService scheduledExecutor) {
    return (FluentFuture<V>) Futures.withTimeout(this, timeout, unit, scheduledExecutor);
  }
@GwtIncompatible // ScheduledExecutorService
  @SuppressWarnings("GoodTime") // should accept a java.time.Duration
  public final FluentFuture<V> withTimeout(
      long timeout, TimeUnit unit, ScheduledExecutorService scheduledExecutor) {
    return (FluentFuture<V>) Futures.withTimeout(this, timeout, unit, scheduledExecutor);
  }
Returns a future that delegates to this future but will finish early (via a {@link
TimeoutException} wrapped in an {@link ExecutionException}) if the specified timeout expires.
If the timeout expires, not only will the output future finish, but also the input future
({@code this}) will be cancelled and interrupted.

@param timeout when to time out the future
@param unit the time unit of the time parameter
@param scheduledExecutor The executor service to enforce the timeout.