Class FakeTicker

    • Method Detail

      • advance

        public FakeTicker advance​(long nanoseconds)
        Advances the ticker value by nanoseconds.
      • advance

        @GwtIncompatible
        public FakeTicker advance​(Duration duration)
        Advances the ticker value by duration.
        Since:
        28.0
      • setAutoIncrementStep

        public FakeTicker setAutoIncrementStep​(long autoIncrementStep,
                                               TimeUnit timeUnit)
        Sets the increment applied to the ticker whenever it is queried.

        The default behavior is to auto increment by zero. i.e: The ticker is left unchanged when queried.

      • setAutoIncrementStep

        @GwtIncompatible
        public FakeTicker setAutoIncrementStep​(Duration autoIncrementStep)
        Sets the increment applied to the ticker whenever it is queried.

        The default behavior is to auto increment by zero. i.e: The ticker is left unchanged when queried.

        Since:
        28.0
      • read

        public long read()
        Specified by:
        read in class com.google.common.base.Ticker