Provides instant class.
3.40.1. type instant¶
An instant is a point of time on the time line.
An instant consists of a nanosecond precision epoch time, which is an elapsed time from 1970-01-01T00:00:00Z. The definition of the length of seconds follows the Java Time-Scale:
Thus, no leap seconds are inserted to the epoch time of an instant.
The scale of the epoch time is 9.
The range of epoch time is [-999999999999.999999999, 999999999999.999999999]. The minimum and the maximum values represent 29720 BC and AD 33658 respectively in ISO 8601 calendar system.
“epoch_time” method returns the epoch time of the instant.
The result is a num, the scale of which is 9.
I1 < I2, I1 <= I2, I1 == I2, I1 != I2, I1 >= I2, I1 > I2¶
Instants are comparable based on the order of the epoch times.
`repr` returns the str representation of the instant such as "(instant 1580445786.123456789)".
INSTANT.new fun makes an instant val representing the Epoch_time.
• Epoch_time must be a num.
• The scale of Epoch_time must be less than or equal to 9.
• Epoch_time must be in the range [-999999999999.999999999, 999999999999.999999999].
INSTANT.now returns an instant val of the current instant provided by the system clock.
The result is not guarunteed to to progress monotonically, or smoothly. For example, when the system clock is synchronized, the result can move back or jump forward.
If you want to measure the elapsed machine time, use STOPWATCH.start. See kink/STOPWATCH.
INSTANT.is? returns whether Val is an instant val.