Clock

interface Clock(source)

A source of Instant values.

See Clock.System for the clock instance that queries the operating system.

Inheritors

Types

Link copied to clipboard
object Companion
Link copied to clipboard
object System : Clock

The Clock instance that queries the operating system as its source of knowledge of time.

Functions

Link copied to clipboard

Returns a TimeSource that uses this Clock to mark a time instant and to find the amount of time elapsed since that mark.

Link copied to clipboard
abstract fun now(): Instant

Returns the Instant corresponding to the current time, according to this clock.

Link copied to clipboard

Returns the current date at the given time zone, according to this Clock.