code: public T get(long timeout, TimeUnit unit)
        throws InterruptedException, ExecutionException, TimeoutException {
      long nanos = unit.toNanos(timeout);
      Object r;
      if ((r = result) == null)
        r = timedGet(nanos);
      return (T) reportGet(r);
    }
docs: Waits if necessary for at most the given time for this future to complete, and then returns its
  result, if available.
  
  @param timeout the maximum time to wait
  @param unit the time unit of the timeout argument
  @return the result value
  @throws CancellationException if this future was cancelled
  @throws ExecutionException if this future completed exceptionally
  @throws InterruptedException if the current thread was interrupted while waiting
  @throws TimeoutException if the wait timed out