Skip to main content

Module timing

Module timing 

Source
Expand description

WASM-compatible timing abstraction.

On native targets, uses std::time::Instant for wall-clock timing. On WASM (wasm32), provides a no-op timer that always reports zero elapsed time. This allows algorithms to compile and run on WASM without panicking, while still supporting time-based termination on native platforms.

Structsยง

Timer
A wall-clock timer backed by Instant on native targets.