code: public synchronized boolean waitForSlot() {
  
          if (!m_enabled) {
              return true;
          } else {
              long now = System.currentTimeMillis();
              long timeToWait = m_nextScheduleTime - now;
              if (timeToWait <= 0) {
                  // This happens either if this method is called for the first time,
                  // or if the wait interval for the last thread to enter the queue has
                  // already fully elapsed
                  m_nextScheduleTime = now + m_interval;
                  return true;
              } else if (m_waitCount >= m_maxLength) {
                  return false;
              } else {
                  m_nextScheduleTime = m_nextScheduleTime + m_interval;
                  m_waitCount += 1;
                  try {
                      // use wait here instead of sleep because it releases the object monitor
  
                      // note that timeToWait can't be 0 here, because this case is handled in the first if() branch,
                      // so wait() always returns after the given period
                      wait(timeToWait);
                  } catch (InterruptedException e) {
                      // TODO Auto-generated catch block
                      e.printStackTrace();
                  }
                  m_waitCount -= 1;
                  return true;
              }
          }
      }
docs: If there are currently any threads waiting on this queue, wait for the interval given on construction after the currenly last thread stops waiting.<p>
  
  @return false if the queue was too long to wait, true otherwise