@Service class DefaultBusinessTime extends Object implements BusinessTime
BusinessTime
to record Duration
s to calculate the current business time
by accumulating them.Constructor and Description |
---|
DefaultBusinessTime() |
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
BusinessTime.forward(Duration) . |
LocalDateTime |
getTime()
Returns the current business time.
|
public LocalDateTime getTime()
BusinessTime
BusinessTime.forward(Duration)
.getTime
in interface BusinessTime
public void forward(Duration duration)
BusinessTime
Duration
. Calling the method multiple times will accumulate
durations.forward
in interface BusinessTime
public Duration getOffset()
BusinessTime
BusinessTime.forward(Duration)
.getOffset
in interface BusinessTime
Copyright © 2014 Pivotal Software, Inc.. All rights reserved.