Class StageClock

  • All Implemented Interfaces:
    Schedule

    public class StageClock
    extends Clock
    Clock that invokes timer functions on an execution Stage, rather than on the clock thread.
    • Field Detail

      • stage

        protected final Stage stage
        Stage on which to execute timer functions.
    • Constructor Detail

      • StageClock

        public StageClock​(Stage stage,
                          int tickMillis,
                          int tickCount)
        Constructs a new StageClock with a timer resolution of tickMillis milliseconds, and a clock period of tickCount ticks per revolution, that executes timer functions on the given stage.
      • StageClock

        public StageClock​(Stage stage,
                          ClockDef clockDef)
        Constructs a new StageClock, with the timer resolution and clock period specified by the given clockDef, that executes timer functions on the given stage.
      • StageClock

        public StageClock​(Stage stage)
        Constructs a new StageClock with a timer resolution of Clock.TICK_MILLIS milliseconds, and a clock period of Clock.TICK_COUNT ticks per revolution, that executes timer functions on the given stage.
    • Method Detail

      • stage

        public final Stage stage()
        Returns the stage on which to execute timer functions.