Package 

Class ControllableTimeSource

    • Method Summary

      Modifier and Type Method Description
      void advance(long nanosIncrement)
      void set(long nanos)
      long getNanoTicks() Returns monotonically increasing ticks from some arbitrary start point.
      long getCurrentTimeMillis() Milliseconds since the start of the epoch
      long getCurrentTimeMicros() Microseconds since the start of the epoch
      long getCurrentTimeNanos() Nanoseconds since the start of the epoch.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • advance

         void advance(long nanosIncrement)
      • set

         void set(long nanos)
      • getNanoTicks

         long getNanoTicks()

        Returns monotonically increasing ticks from some arbitrary start point. Should only be used tomeasure durations. Negative numbers and zero are both valid return values

      • getCurrentTimeNanos

         long getCurrentTimeNanos()

        Nanoseconds since the start of the epoch. Valid for the time range 1/1/1970 +/- 270 years