@Component(value="cuba_TimeSource") public class TimeSourceImpl extends java.lang.Object implements TimeSource
TimeSource interface.NAME| Constructor and Description |
|---|
TimeSourceImpl() |
| Modifier and Type | Method and Description |
|---|---|
long |
currentTimeMillis()
Return current timestamp in milliseconds.
|
java.util.Date |
currentTimestamp()
Return current timestamp as Date instance.
|
java.time.ZonedDateTime |
now()
Return
ZonedDateTime for current timestamp. |
public java.util.Date currentTimestamp()
TimeSourcecurrentTimestamp in interface TimeSourcepublic long currentTimeMillis()
TimeSourcecurrentTimeMillis in interface TimeSourcepublic java.time.ZonedDateTime now()
TimeSourceZonedDateTime for current timestamp.now in interface TimeSource