SystemClock

A clock that provides the time from the current system.

The time zone is treated as an immutable property of the clock, set when it is created. If you wish to follow changes to the system clock's configured time zone, you must create a new SystemClock in response to any time zone changes.

abstract class SystemClock : Clock

Types

Companion
Link copied to clipboard
common
object Companion

Functions

equals
Link copied to clipboard
common
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open override fun hashCode(): Int
readInstant
Link copied to clipboard
common

Reads the current Instant.

abstract override fun readInstant(): Instant
readMilliseconds
Link copied to clipboard
common

Reads the current number of milliseconds that have elapsed since the Unix epoch of 1970-01-01T00:00 in UTC.

abstract override fun readMilliseconds(): LongMilliseconds
readPlatformInstant
Link copied to clipboard
common

Reads the current PlatformInstant.

abstract override fun readPlatformInstant(): PlatformInstant
toString
Link copied to clipboard
common
open override fun toString(): String

Properties

zone
Link copied to clipboard
common

The time zone of this clock.

abstract override val zone: TimeZone