SystemTimeProvider

Generic contract for the system time provider.

Important: This is a Public Preview API. It may be changed or removed at any time.

Functions

Link copied to clipboard
abstract fun currentTimeMillis(): Long

Returns the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC.

Link copied to clipboard
abstract fun elapsedRealtime(): Long

Returns milliseconds since device boot.

Link copied to clipboard
abstract fun elapsedRealtimeNanos(): Long

Returns nanoseconds since device boot.

Inheritors

Link copied to clipboard