Class PausableRelativeClock

  • All Implemented Interfaces:
    TimerGauge.StartStopListener, org.apache.flink.util.clock.RelativeClock

    @Internal
    @ThreadSafe
    public class PausableRelativeClock
    extends Object
    implements org.apache.flink.util.clock.RelativeClock, TimerGauge.StartStopListener
    A RelativeClock whose time progress with respect to the wall clock can be paused and un-paused. It can be paused multiple times. If it is paused N times, it has to be un-paused also N times to resume progress.
    • Constructor Detail

      • PausableRelativeClock

        public PausableRelativeClock​(org.apache.flink.util.clock.Clock baseClock)
    • Method Detail

      • relativeTimeMillis

        public long relativeTimeMillis()
        Specified by:
        relativeTimeMillis in interface org.apache.flink.util.clock.RelativeClock
      • relativeTimeNanos

        public long relativeTimeNanos()
        Specified by:
        relativeTimeNanos in interface org.apache.flink.util.clock.RelativeClock
      • pause

        public void pause()
      • unPause

        public void unPause()