Skip to main content

tilo_process_services/
time.rs

1//! The toolkit's clock: `tilo-clock`, under the toolkit's module path.
2//!
3//! Every monotonic and wall-clock reading in `ui` goes through [`now`] and
4//! [`wall`], and every clock type is named through this module rather than
5//! `std::time`. A process that has no process clock of its own (or one that must
6//! be virtualised, such as a deterministic replay) then has exactly one boundary to
7//! provide, instead of a hundred scattered `Instant::now()` calls.
8//!
9//! On targets with a native clock the re-exports are `std::time`'s own types,
10//! so values cross freely into crates that name `std::time` directly.
11//!
12//! `crates/ui/ui-core/clippy.toml` rejects `Instant::now` and
13//! `SystemTime::now` everywhere else in the crate.
14
15pub use tilo_clock::time::*;