code: public void await(Event event, long timeout, TimeUnit unit) throws InterruptedException, TimeoutException {
          long timestamp = getTimestamp(event);
          try {
              lock.lockInterruptibly();
              single(timestamp);
              while (isPermit(event, timestamp) == false) {
                  condition.await(timeout, unit);
              }
          } finally {
              lock.unlock();
          }
      }
docs: 判断自己的timestamp是否可以通过,带超时控制
  
  @throws InterruptedException
  @throws TimeoutException