code: @Override
      public T poll(long timeout, TimeUnit unit) throws InterruptedException {
          T old = poll();
          long endTimeMillis = System.currentTimeMillis() + unit.toMillis(timeout);
          long timeLeftMillis = endTimeMillis - System.currentTimeMillis();
          int spinctr = SPINS_TAKE_;
  
          while (old == null && timeLeftMillis > 0) {
              while (size() <= 0 && timeLeftMillis > 0) {
                  if (spinctr > 0) {
                      // busy wait
                      if (YIELD_TAKE_)
                          Thread.yield();
                      spinctr--;
                  } else {
                      // block on lock
                      waitGet_(timeLeftMillis);
                  }
                  timeLeftMillis = endTimeMillis - System.currentTimeMillis();
              }
  
              old = poll();
              timeLeftMillis = endTimeMillis - System.currentTimeMillis();
          }
  
          return old;
      }
docs: Removes an object from the buffer. If the buffer is empty, the call blocks for up to
  a specified amount of time before it gives up.
  
  @param timeout -
  the amount of time, that the caller is willing to wait
  in the event of an empty buffer.
  @param unit -
  the unit of time