-
public interface TimeProviderInterface to provide the current time in both device and server time references.
-
-
Method Summary
Modifier and Type Method Description abstract LonggetDeviceTimestampMillis()Returns the current device timestamp in milliseconds. abstract LonggetServerTimestampMillis()Returns the current server timestamp in milliseconds. abstract LonggetDeviceElapsedTimeNanos()Returns the current device monotonic elapsed time in nanoseconds. abstract LonggetServerOffsetNanos()Returns the offset between the device and server time references in nanoseconds. abstract LonggetServerOffsetMillis()Returns the offset between the device and server time references in milliseconds. abstract LonggetDeviceElapsedRealtimeMillis()Returns the time since boot in milliseconds, including time spent in sleep. -
-
Method Detail
-
getDeviceTimestampMillis
abstract Long getDeviceTimestampMillis()
Returns the current device timestamp in milliseconds. This is implemented in BaseTimeProvider as System.currentTimeMillis.
-
getServerTimestampMillis
abstract Long getServerTimestampMillis()
Returns the current server timestamp in milliseconds.
-
getDeviceElapsedTimeNanos
abstract Long getDeviceElapsedTimeNanos()
Returns the current device monotonic elapsed time in nanoseconds. This is implemented in BaseTimeProvider as System.nanoTime.
-
getServerOffsetNanos
abstract Long getServerOffsetNanos()
Returns the offset between the device and server time references in nanoseconds.
-
getServerOffsetMillis
abstract Long getServerOffsetMillis()
Returns the offset between the device and server time references in milliseconds.
-
getDeviceElapsedRealtimeMillis
abstract Long getDeviceElapsedRealtimeMillis()
Returns the time since boot in milliseconds, including time spent in sleep. This is implemented in BaseTimeProvider as SystemClock.elapsedRealtime.
-
-
-
-