horloge 0.2.1

Clock and timer traits
Documentation

Horloge - clock abstraction for Rust

The horloge Rust crate defines trait for time sources (Now) and sleeping (Sleep). These traits allow to abstract over the concrete implementation. This enables writing generic code using the system clock when deployed or a virtual clock during tests.

This crate provides trait definitions, and implementation providing support for the major time libraries in the Rust ecosystem.

The name "horloge" means clock in french.

Integration

The intent is to provide integration with most libraries in the ecosystem. Here are the currently support libraries. Contributions are welcome.

Time model

Sleep scheduler

Licence

MIT