code: public void tick() throws InterruptedException {
      if (mPreviousTickMs != 0) {
        long executionTimeMs = mClock.millis() - mPreviousTickMs;
        if (executionTimeMs > mIntervalMs) {
          mLogger.warn("{} last execution took {} ms. Longer than the interval {}", mThreadName,
              executionTimeMs, mIntervalMs);
        } else {
          mSleeper.sleep(Duration.ofMillis(mIntervalMs - executionTimeMs));
        }
      }
      mPreviousTickMs = mClock.millis();
    }
docs: Enforces the thread waits for the given interval between consecutive ticks.
  
  @throws InterruptedException if the thread is interrupted while waiting