Algostream_domain_common.Timestampval now : Base.unit -> tWall-clock read. Backed by Unix.time (), so the resolution is whole seconds — adequate for stamping long-lived records, useless for intra-second ordering. Event-time-deterministic layers (backtest, analytics, time_series, pairs, …) must never call this; they pass explicit ts_ns through of_ns.
val of_float : Base.float -> tval of_sec_float : Base.float -> tval of_ms_float : Base.float -> tval of_us_float : Base.float -> tval of_ns : Base.int64 -> tBuild a timestamp from nanoseconds since the epoch — the event-time representation carried by Event.t.timestamp_ns, Bar.t.open_ts, and every ~ts_ns parameter in the analytical layers.
Precision. t is a float64 count of seconds since the epoch. At present-day epoch values (~1.8e9 s) the 53-bit mantissa resolves to roughly 240 ns, so of_ns is not exactly invertible by to_ns at nanosecond granularity. That is well inside bar- and tick-level backtesting needs; do not use these for latency accounting, where Time_utils.Clock.now_monotonic_ns and raw int64 ns are the right tools.
val to_float : t -> Base.floatval to_sec_float : t -> Base.floatval to_ms_float : t -> Base.floatval to_us_float : t -> Base.floatval to_ns : t -> Base.int64Inverse of of_ns, rounded to nearest. Subject to the same ~240 ns precision floor.
val to_string : t -> Base.stringval epoch : tmodule Span : sig ... endmodule Span_constants : sig ... end