public class SystemTimeSource extends Object implements TimeSource
| Constructor and Description |
|---|
SystemTimeSource() |
| Modifier and Type | Method and Description |
|---|---|
long |
millis()
Returns the time in milliseconds.
|
long |
seconds()
Returns the time in seconds.
|
void |
shutdown()
Shutdown the time source.
|
long |
time(TimeUnit tu)
Returns the time in the given time unit.
|
public long time(TimeUnit tu)
TimeSourcetime in interface TimeSourcetu - The time unit for the return valuepublic long seconds()
TimeSourceTimeSource.time(TimeUnit)seconds in interface TimeSourcepublic long millis()
TimeSourceTimeSource.time(TimeUnit)millis in interface TimeSourcepublic void shutdown()
TimeSourceshutdown in interface TimeSourceCopyright © 2018 trivago. All rights reserved.