TestClock - corda

corda / net.corda.testing.node / TestClock

# TestClock

`@ThreadSafe class TestClock : MutableClock`

A Clock that can have the time advanced for use in testing.

### Constructors

#### <init> | A Clock that can have the time advanced for use in testing. `TestClock(delegateClock: Clock)`

### Functions

#### advanceBy | Advance this Clock by the specified Duration for testing purposes. `fun advanceBy(duration: Duration): Unit`
#### setTo | 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. `fun setTo(newInstant: Instant): Unit`