Clock

interface Clock

An abstraction providing the current time.

For an implementation that uses the system's clock, see SystemClock. FixedClock is also available for testing purposes.

See also

Functions

equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open fun hashCode(): Int
readInstant
Link copied to clipboard
common
abstract fun readInstant(): Instant
Reads the current Instant.
readMilliseconds
Link copied to clipboard
common
abstract fun readMilliseconds(): LongMilliseconds
Reads the current number of milliseconds that have elapsed since the Unix epoch of 1970-01-01T00:00 in UTC.
readPlatformInstant
Link copied to clipboard
common
abstract fun readPlatformInstant(): PlatformInstant
Reads the current PlatformInstant.
toString
Link copied to clipboard
common
open fun toString(): String

Properties

zone
Link copied to clipboard
common
abstract val zone: TimeZone
The time zone of this clock.

Inheritors

FixedClock
Link copied to clipboard
SystemClock
Link copied to clipboard