An absolute point in time, more efficient and precise than the float
-based [root:Time],
but representing a narrower range of times.
This module represents absolute times with nanosecond precision, approximately between the years 1823 and 2116 CE.
int
s are always immediate and so play nicely with the GC write barrier.
Unfortunately, private int
is necessary for the compiler to optimize uses.
Time.t is precise to approximately 0.24us in 2014. If to_span
tries to convert
to the closest Time.Span.t
, we have stability problems: converting back yields a
different t
, sometimes different enough to have a different external
representation, because the conversion back and forth crosses a rounding boundary.
To stabilize conversion, we treat Time.t
as having 1us precision: to_span
and
of_span
both round to the nearest 1us.
Will raise on 32-bit platforms. Consider to_int63_ns_since_epoch
instead.