code: public SofaResponse getSofaResponse(int timeout, TimeUnit unit) throws CancellationException,
          TimeoutException, InterruptedException, ExecutionException {
          long realTimeOut = unit.toMillis(timeout);
          long remainTime = realTimeOut - (sentTime - genTime); // 剩余时间
          if (remainTime <= 0) { // 没有剩余时间不等待
              if (isDone()) { // 直接看是否已经返回
                  return getNowResponse();
              }
          } else { // 等待剩余时间
              if (await(remainTime, TimeUnit.MILLISECONDS)) {
                  return getNowResponse();
              }
          }
          this.setDoneTime();
          throw new TimeoutException();
      }
docs: Waits if necessary for at most the given time for the computation
  to complete, and then retrieves its result, if available.
  
  @param timeout the maximum time to wait
  @param unit the time unit of the timeout argument
  @return the computed result
  @throws CancellationException if the computation was cancelled
  @throws ExecutionException if the computation threw an
  exception
  @throws InterruptedException if the current thread was interrupted
  while waiting
  @throws TimeoutException if the wait timed out