Class ShadowPausedSystemClock

    • Constructor Detail

      • ShadowPausedSystemClock

        public ShadowPausedSystemClock()
    • Method Detail

      • sleep

        @Implementation
        protected static void sleep​(long millis)
        Advances the current time by given millis, without sleeping the current thread/
      • setCurrentTimeMillis

        @Implementation
        protected static boolean setCurrentTimeMillis​(long millis)
        Sets the current wall time.

        Currently does not perform any permission checks.

        Returns:
        false if specified time is less than current time.
      • uptimeMillis

        @Implementation
        protected static long uptimeMillis()
      • elapsedRealtime

        @Implementation
        protected static long elapsedRealtime()
      • elapsedRealtimeNanos

        @Implementation(minSdk=17)
        protected static long elapsedRealtimeNanos()
      • currentThreadTimeMillis

        @Implementation
        protected static long currentThreadTimeMillis()
      • currentThreadTimeMicro

        @HiddenApi
        @Implementation
        protected static long currentThreadTimeMicro()
      • currentTimeMicro

        @HiddenApi
        @Implementation
        protected static long currentTimeMicro()
      • currentNetworkTimeMillis

        @Implementation(minSdk=28)
        @HiddenApi
        protected static long currentNetworkTimeMillis()
      • reset

        @Resetter
        public static void reset()