Class MockTimeService

    • Field Detail

      • myTime

        public volatile long myTime
    • Constructor Detail

      • MockTimeService

        public MockTimeService()
      • MockTimeService

        public MockTimeService​(long time)
    • Method Detail

      • now

        public long now()
        Description copied from interface: TimeService
        Provides current time millis.
        Specified by:
        now in interface TimeService
        Returns:
        current time.
      • inc

        public void inc()
      • inc

        public void inc​(long amount,
                        TimeUnit timeUnit)
      • jumpTo

        public void jumpTo​(int periodInSeconds)
      • jumpTo

        public void jumpTo​(long periodInMilliseconds)
      • setTime

        public void setTime​(long currentTimeMillis)