An absolute point in time, more efficient and precise than the
but representing a narrower range of times.
This module represents absolute times with nanosecond precision, approximately between the years 1823 and 2116 CE.
NOTE: you should normally default to using
Time instead of this module. The
Time.tvalues, so it will likely be much more convenient for you.
Time.tand the other half expecting
Some reasons you might want want to actually prefer
Time_ns.t in certain cases:
ints rather than
floats internally, which makes certain things easier to reason about, since ints respect a bunch of arithmetic identities that floats don't, e.g.,
x + (y + z) = (x + y) + z.
All in all, it would have been nice to have chosen
Time_ns.t to begin with, but
we're unlikely to flip everything to
Time_ns.t in the short term (see comment at
the end of time_ns.ml).
Unix epoch (1970-01-01 00:00:00 UTC)
Will raise on 32-bit platforms. Consider
pause span sleeps for
pause_forever sleeps indefinitely.