@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()
TimeSource
currentTimestamp
in interface TimeSource
public long currentTimeMillis()
TimeSource
currentTimeMillis
in interface TimeSource
public java.time.ZonedDateTime now()
TimeSource
ZonedDateTime
for current timestamp.now
in interface TimeSource