Skip to main content

Module time

Module time 

Source
Expand description

Time utilities — server timestamp generation using monotonic clock.

Must use the same clock as the client (mach_continuous_time on macOS, CLOCK_MONOTONIC on Linux) for time sync to work.

Structs§

ChunkTimestamper
Generates evenly-spaced timestamps based on sample count. This matches the C++ server behavior: timestamps reflect when audio should be played, not when it was read from the source.

Functions§

now_usec
Current monotonic time in microseconds.