Interface ScenarioRunner.TickPacer

All Known Implementing Classes:
RealTimePacer
Enclosing class:
ScenarioRunner
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface ScenarioRunner.TickPacer
Runs after each tick has been logged, and may make the run wait. This is the one seam where a run can be slowed to real time for a person watching it (the live-drive pacer). It is handed the sim time for information only: nothing it does can reach the sim, because the next tick advances the clock by the same fixed step whatever happened here. Every headless run uses ScenarioRunner.NO_PACING.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    afterTick(int ticksCompleted, double simSeconds)
    Called once after each tick is logged; may wait before returning.
  • Method Details

    • afterTick

      void afterTick(int ticksCompleted, double simSeconds)
      Called once after each tick is logged; may wait before returning.
      Parameters:
      ticksCompleted - how many ticks have run so far, this one included
      simSeconds - the sim clock after this tick, seconds