code: private boolean await0(long timeoutMillis, boolean interruptable) throws InterruptedException {
          long endTime = System.currentTimeMillis() + timeoutMillis;
          
          if (endTime < 0) {
              endTime = Long.MAX_VALUE;
          }
  
          synchronized (lock) {
              if (ready) {
                  return ready;
              } else if (timeoutMillis <= 0) {
                  return ready;
              }
  
              waiters++;
              
              try {
                  for (;;) {
                      try {
                          long timeOut = Math.min(timeoutMillis, DEAD_LOCK_CHECK_INTERVAL);
                          lock.wait(timeOut);
                      } catch (InterruptedException e) {
                          if (interruptable) {
                              throw e;
                          }
                      }
  
                      if (ready) {
                          return true;
                      }
                      
                      if (endTime < System.currentTimeMillis()) {
                          return ready;
                      }
                  }
              } finally {
                  waiters--;
                  if (!ready) {
                      checkDeadLock();
                  }
              }
          }
      }
docs: Wait for the Future to be ready. If the requested delay is 0 or
  negative, this method immediately returns the value of the
  'ready' flag.
  Every 5 second, the wait will be suspended to be able to check if
  there is a deadlock or not.
  
  @param timeoutMillis The delay we will wait for the Future to be ready
  @param interruptable Tells if the wait can be interrupted or not
  @return <code>true</code> if the Future is ready
  @throws InterruptedException If the thread has been interrupted
  when it's not allowed.