Class ShadowSystemClock

    • Field Detail

      • networkTimeAvailable

        protected static boolean networkTimeAvailable
    • Constructor Detail

      • ShadowSystemClock

        public ShadowSystemClock()
    • Method Detail

      • currentTimeMillis

        public static long currentTimeMillis()
        Implements System.currentTimeMillis() through ShadowWrangler.
        Returns:
        Current time in millis.
      • setNetworkTimeAvailable

        public static void setNetworkTimeAvailable​(boolean available)
        Sets whether network time is available.
      • advanceBy

        public static void advanceBy​(long time,
                                     TimeUnit unit)
        An alternate to advanceBy(Duration) for older Android code bases where Duration is not available.
      • setGnssTimeAvailable

        public static void setGnssTimeAvailable​(boolean available)
        Sets whether gnss location based time is available.
      • reset

        public static void reset()