public interface BusinessTime
Duration
for testing and simulation purposes.Modifier and Type | Method and Description |
---|---|
void |
forward(Duration duration)
Forwards the current time with the given
Duration . |
Duration |
getOffset()
Returns the current offset between the real time and the virtual one created by calling
forward(Duration) . |
LocalDateTime |
getTime()
Returns the current business time.
|
void |
reset()
Undoes any forwarding.
|
LocalDateTime getTime()
forward(Duration)
.void forward(Duration duration)
Duration
. Calling the method multiple times will accumulate
durations.duration
- Duration getOffset()
forward(Duration)
.void reset()
getTime()
will be equivalent to the system's time again.Copyright © 2018 Pivotal Software, Inc.. All rights reserved.