Overview of quanta
mainquanta is a high-speed timing library designed for extremely low-overhead time acquisition and manipulation. It is primarily used for getting the current time very quickly or counting CPU cycles.
Key features include:
- CPU Cycle Counting: Access the Time Stamp Counter (TSC) directly to count cycles.
- Monotonic Time: Retrieve monotonic time in nanoseconds, using TSC or an OS fallback.
- Low Overhead: Designed to be as fast as or faster than
std::time::Instant::now(). - Mockable: Supports mocking time, which is essential for testing time-dependent application logic.
- Cross-platform: Works across major platforms with automatic fallbacks.