class TestClock
A Clock that can have the time advanced for use in testing.
TestClock(delegateClock: Clock)
A Clock that can have the time advanced for use in testing. |
fun advanceBy(duration: Duration): Unit
Advance this Clock by the specified Duration for testing purposes. |
|
fun setTo(newInstant: Instant): Unit
Move this Clock to the specified Instant for testing purposes. This will only be approximate due to the time ticking away, but will be some time shortly after the requested Instant. |