Function mosaic::wall_clock_ns#

Function Documentation#

inline int64_t mosaic::wall_clock_ns() noexcept#

Nanoseconds since the Unix epoch (system_clock).

Use this for absolute timestamps in file names and in session_meta.json — where you need to know when the event happened in calendar time, not just how long after session start.

Returns:

Nanoseconds since 1970-01-01T00:00:00Z.

Warning

Unlike elapsed_ns(), this value can jump backwards if the system clock is adjusted. Never use it for duration measurements.