Skip to content

//core/io.islandtime.clock/Clock

Clock

common

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

common

io.islandtime.clock.SystemClock
io.islandtime.clock.FixedClock

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.

Properties

Name Summary
zone

common

abstract val zone: TimeZone

The time zone of this clock.

Inheritors

Name
FixedClock
SystemClock