code: public void pacedCall(Runnable call, Runnable orElse) {
      long now = timeSource.getTimeMillis();
      long end = nextLogTime.get();
      if(now >= end && nextLogTime.compareAndSet(end, now + delay)) {
        call.run();
      } else {
        orElse.run();
      }
    }
docs: Execute the call at the request page or call the alternative the rest of the time. An example would be to log
  a repetitive error once every 30 seconds or always if in debug.
  <p>
  <pre>{@code
  Pacer pacer = new Pacer(30_000);
  String errorMessage = "my error";
  pacer.pacedCall(() -> log.error(errorMessage), () -> log.debug(errorMessage);
  }
  </pre>
  
  @param call call to be paced
  @param orElse call to be done everytime