Package net.time4j.base
Interface TimeSource<T extends UnixTime>
- Type Parameters:
T
- generic type of current time
- All Known Implementing Classes:
AbstractClock
,AdjustableClock
,DaytimeClock
,FixedClock
,HttpClock
,NetTimeConnector
,SntpConnector
,SystemClock
public interface TimeSource<T extends UnixTime>
Represents any kind of clock as source of current world time.
- Author:
- Meno Hochschild
-
Method Summary
Modifier and TypeMethodDescriptiondefault Instant
Obtains the current instant.Yields the current time.
-
Method Details
-
currentTime
T currentTime()Yields the current time.
- Returns:
- current time in seconds (as
UnixTime
object or derivate)
-
currentInstant
Obtains the current instant.
- Returns:
- current instant as JSR-310-type
- Since:
- 5.6
-