@Implements(value=android.os.SystemClock.class, isInAndroidSdk=false, shadowPicker=Picker.class) public class ShadowPausedSystemClock extends ShadowSystemClock
LooperMode.Mode.PAUSED
is active.
In this variant, there is just one global system time controlled by this class. The current
time is fixed in place, and manually advanced by calling SystemClock.setCurrentTimeMillis(long)
SystemClock.uptimeMillis()
and SystemClock.currentThreadTimeMillis()
are
identical.
This class should not be referenced directly. Use ShadowSystemClock instead.
ShadowSystemClock.Picker
networkTimeAvailable
Constructor | Description |
---|---|
ShadowPausedSystemClock() |
Modifier and Type | Method | Description |
---|---|---|
protected static long |
currentNetworkTimeMillis() |
|
protected static long |
currentThreadTimeMicro() |
|
protected static long |
currentThreadTimeMillis() |
|
protected static long |
currentTimeMicro() |
|
protected static long |
elapsedRealtime() |
|
protected static long |
elapsedRealtimeNanos() |
|
static void |
reset() |
|
protected static boolean |
setCurrentTimeMillis(long millis) |
Sets the current wall time.
|
protected static void |
sleep(long millis) |
Advances the current time by given millis, without sleeping the current thread/
|
protected static long |
uptimeMillis() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
advanceBy, currentGnssTimeClock, currentTimeMillis, nanoTime, setGnssTimeAvailable, setNanoTime, setNetworkTimeAvailable
@Implementation protected static void sleep(long millis)
@Implementation protected static boolean setCurrentTimeMillis(long millis)
Currently does not perform any permission checks.
@Implementation protected static long uptimeMillis()
@Implementation protected static long elapsedRealtime()
@Implementation(minSdk=17) protected static long elapsedRealtimeNanos()
@Implementation protected static long currentThreadTimeMillis()
@HiddenApi @Implementation protected static long currentThreadTimeMicro()
@HiddenApi @Implementation protected static long currentTimeMicro()
@Implementation(minSdk=28) @HiddenApi protected static long currentNetworkTimeMillis()
@Resetter public static void reset()