public Finishable startTimer(String name, boolean logStart) {
    Timer timer = Timer.start();
    Stage stage = new Stage(timer);
    timers.put(name, stage);
    Stage last = currentStage.getAndSet(stage);
    if (logStart) {
      LOGGER.info("");
      LOGGER.info("Starting...");
    }
    return new Finishable() {
      @Override
      public void stop() {
        LOGGER.info("Finished in {}", timers.get(name).timer.stop());
        for (var details : getStageDetails(name, true)) {
          LOGGER.info("  {}", details);
        }
        currentStage.set(last);
      }

      @Override
      public ProcessTime elapsed() {
        return timer.elapsed();
      }
    };
  }
A registry of tasks that are being timed.
planetiler-core/src/main/java/com/onthegomap/planetiler/stats/Timers.java