Skip to content

//core/io.islandtime.clock/Clock

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

SystemClock
FixedClock

Inheritors

FixedClock
SystemClock

Properties

Name Summary
zone

common


abstract val zone: TimeZone

The time zone of this clock.

Functions

Name Summary
readInstant

common


abstract fun readInstant(): Instant

Reads the current Instant.
readMilliseconds

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

common


abstract fun readPlatformInstant(): PlatformInstant

Reads the current PlatformInstant.