record Instant : Type A fixed point on the global timeline, measured in nanoseconds from
March 1, 2000 at 00:00:00 UTC.
Representation benchmark note: if profiling shows scalar `Integer`
arithmetic to be costly, compare it with a proof-oriented record of an
`Integer` day, `Fin 86400` second-of-day, and `Fin 1000000000` nanosecond.
The scalar is preferred until then because canonical form is structural
and arithmetic cannot overflow or require normalization proofs.
Totality: total
Visibility: export
Constructor: MkInstant : Integer -> Instant
Projection: .storedNanoseconds : Instant -> Integer
Hints:
Eq Instant Ord Instant Show Instant
fromNanosecondsSinceEpoch : Integer -> Instant Construct an instant from nanoseconds relative to the library epoch.
Totality: total
Visibility: public exporttoNanosecondsSinceEpoch : Instant -> Integer Read an instant as nanoseconds relative to the library epoch.
Totality: total
Visibility: public exportticks : Instant -> Integer Backward-compatible name for `toNanosecondsSinceEpoch`.
Totality: total
Visibility: exportinstantNanosecondsRoundTrip : (value : Integer) -> toNanosecondsSinceEpoch (fromNanosecondsSinceEpoch value) = value Converting a scalar nanosecond count to an instant and back is exact.
Totality: total
Visibility: public exportinstantRoundTrip : (value : Instant) -> fromNanosecondsSinceEpoch (toNanosecondsSinceEpoch value) = value Reconstructing an instant from its scalar nanosecond count is exact.
Totality: total
Visibility: public exportfromSecondsSinceUnixEpoch : Integer -> Instant Construct an instant from whole seconds relative to the Unix epoch.
Totality: total
Visibility: public exportfromNanosecondsSinceUnixEpoch : Integer -> Instant Construct an instant from nanoseconds relative to the Unix epoch.
Totality: total
Visibility: public exporttoNanosecondsSinceUnixEpoch : Instant -> Integer Read an instant as nanoseconds relative to the Unix epoch.
Totality: total
Visibility: public exporttoSecondsSinceUnixEpoch : Instant -> Integer Read an instant as whole seconds relative to the Unix epoch, truncated toward negative infinity.
Totality: total
Visibility: public exportaddDuration : Instant -> Duration -> Instant Add a fixed duration to an instant.
Totality: total
Visibility: exportadd : Instant -> Duration -> Instant- Totality: total
Visibility: public export subtractDuration : Instant -> Duration -> Instant Subtract a fixed duration from an instant.
Totality: total
Visibility: exportminus : Instant -> Duration -> Instant- Totality: total
Visibility: public export difference : Instant -> Instant -> Duration Compute the signed fixed duration from the second instant to the first.
Totality: total
Visibility: public exportnow : IO Instant Read the current UTC system clock as an instant.
Totality: total
Visibility: public exportepoch : Instant The library epoch: March 1, 2000 at 00:00:00 UTC.
Totality: total
Visibility: public export