Clock
A source of Instant values.
See Clock.System for the clock instance that queries the operating system.
It is not recommended to use Clock.System directly in the implementation. Instead, you can pass a Clock explicitly to the necessary functions or classes. This way, tests can be written deterministically by providing custom Clock implementations to the system under test.
Inheritors
Types
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.