public class SimpleClock extends Object implements Clock
Clock
interface that simply sets current time
immediately when calling set(Timestamp)
. The clock allows setting
time also to a passed timestamp relative to current time.Constructor and Description |
---|
SimpleClock()
Creates a new clock initialized to
Timestamp.EPOCH_START epoch start. |
SimpleClock(Timestamp time) |
Modifier and Type | Method and Description |
---|---|
Timestamp |
currentTime()
Returns the timestamp that represents the current model time.
|
void |
set(Timestamp time)
Sets the clock to a given time.
|
public SimpleClock()
Timestamp.EPOCH_START
epoch start.public SimpleClock(Timestamp time)
public Timestamp currentTime()
TimeProvider
currentTime
in interface TimeProvider
Copyright © Aimpulse Intelligent Systems GmbH
All rights reserved.