DefaultMonotonicClock

Default monotonic clock, suitable for general-purpose application needs.

This allocates a new handle, so applications with frequent need of a clock handle should call this function once and reuse the handle instead of calling this function each time.

Functions

Link copied to clipboard
open override 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
open override fun now(): Instant

Read the current value of the clock.

Link copied to clipboard
open override fun resolution(): Instant

Query the resolution of the clock.