This clock differs from Clock in providing access to the current instant
in the UTC and TAI time-scales. However, there is currently no implementation that
provides accurate UTC or TAI.
The principal methods are defined to allow the throwing of an exception. In normal use, no exceptions will be thrown, however one possible implementation would be to obtain the time from a central time server across the network. Obviously, in this case the lookup could fail, and so the method is permitted to throw an exception.
Subclass implementations should implement Serializable wherever possible.
They should also be immutable and thread-safe, implementing equals(),
hashCode() and toString() based on their state.
| Modifier and Type | Method and Description |
|---|---|
| public Instant | |
| public TaiInstant | Returns: the currentTaiInstant from this time-source, not nullGets the current |
| public UtcInstant | Returns: the currentUtcInstant from this time-source, not nullGets the current |
| instant | back to summary |
|---|---|
| public Instant instant() Gets the current
The instant returned is based on the Java time-scale defined in
| |
| taiInstant | back to summary |
|---|---|
| public TaiInstant taiInstant() Gets the current The TAI time-scale is a simple incrementing number of seconds from the TAI epoch of 1958-01-01(TAI). It ignores all human concepts of time such as days. An accurate implementation of this interface will return the correct TAI instant.
| |
| utcInstant | back to summary |
|---|---|
| public UtcInstant utcInstant() Gets the current The UTC time-scale is the current world civil time and includes leap seconds. An accurate implementation of this interface will return the correct UTC instant.
| |