MonotonicClock

interface MonotonicClock

A monotonic clock is a clock which has an unspecified initial value, and successive reads of the clock will produce non-decreasing values.

It is intended for measuring elapsed time.

Inheritors

Functions

Link copied to clipboard
abstract fun newTimer(initial: Instant): MonotonicTimer

This creates a new MonotonicTimer with the given starting time. It will count down from this time until it reaches zero.

Link copied to clipboard
abstract fun now(): Instant

Read the current value of the clock.

Link copied to clipboard
abstract fun resolution(): Instant

Query the resolution of the clock.