code: public void addListener(Listener listener, long listenerCheckMillis) {
      queue.add(listener);
  
      long newFrequency = Math.min(MINIMUM_CHECK_DELAY_MILLIS, listenerCheckMillis);
  
      //first listener
      if (currentScheduledFrequency.get() == -1) {
        if (currentScheduledFrequency.compareAndSet(-1, newFrequency)) {
          fixedSizedScheduler.schedule(checker, listenerCheckMillis, TimeUnit.MILLISECONDS);
        }
      } else {
        long frequency = currentScheduledFrequency.get();
        if (frequency > newFrequency) {
          currentScheduledFrequency.compareAndSet(frequency, newFrequency);
        }
      }
  
    }
docs: Add listener to validation list.
  
  @param listener            listener
  @param listenerCheckMillis schedule time