code: private void monitor() {
      _lastMonitoringStep = _clock.nanoTime();
      _nextAllowedLogging = _lastMonitoringStep;
      while(!_stopped) {
        try {
          _clock.sleepNano(_checkIntervalNano);
        } catch (InterruptedException e) {
          break;
        }
        monitorStep();
      }
    }
docs: Main loop of monitoring thread.