SystemClock

abstract class SystemClock : Clock

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.

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
abstract fun readInstant(): Instant

Reads the current Instant.

readMilliseconds
Link copied to clipboard
common
abstract fun readMilliseconds(): Milliseconds

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 override fun toString(): String

Properties

zone
Link copied to clipboard
common
abstract val zone: TimeZone

The time zone of this clock.