The Time Framework for Java models time as a series of instantaneous events, known as instants, along a single time-line. This class represents one of those instants.
A physical instant is an instantaneous event. However, for practicality the API and this class uses a precision of nanoseconds.
A physical instant could be at any point on an infinite time-line. However, for practicality the API and this class limits the measurable time-line to the number of seconds that can be held in a {@code long}. This is greater than the current estimated age of the universe.
In order to represent the data a 96 bit number is required. To achieve this the data is stored as seconds, measured using a {@code long}, and nanoseconds, measured using an {@code int}. The nanosecond part will always be between 0 and 999,999,999 representing the nanosecond part of the second.
The seconds are measured from the standard Java epoch of 1970-01-01T00:00:00Z. Instants on the time-line after the epoch are positive, earlier are negative.
This class uses the {@link TimeScales#simplifiedUtc() simplified UTC} time scale.The scale keeps in step with true UTC by simply ignoring leap seconds. This scale has been chosen as the default because it is simple to understand and is what most users of the API expect. If the application needs an accurate time scale that is aware of leap seconds then {@link TimeScaleInstant} shouldbe used.
Instant is immutable and thread-safe. @author Michael Nascimento Santos @author Stephen Colebourne
|
|
|
|
|
|