Expand description
High-precision timestamp generation with zero syscall overhead.
This module provides monotonically increasing timestamps using the CPU’s Time Stamp Counter (TSC) on x86_64, avoiding syscalls in the hot path.
§Design
- Uses
quantacrate which calibrates against the system clock once at startup - Subsequent reads use RDTSC instruction directly (no syscall)
- Each shard has its own
TimestampGeneratorto eliminate contention - Monotonicity is guaranteed via atomic CAS operations
Structs§
- Timestamp
Generator - High-precision timestamp generator using TSC.