public interface TimeSource
Any implementation must be able to deliver the time in seconds and milliseconds since epoch, and may support more TimeUnit's.
| 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 timeUnit)
Returns the time in the given time unit.
|
long time(TimeUnit timeUnit)
timeUnit - The time unit for the return valuelong seconds()
time(TimeUnit)long millis()
time(TimeUnit)void shutdown()
Copyright © 2018 trivago. All rights reserved.