ash-time 1.0.0

Hybrid Logical Clocks for causality tracking with approximate wall-clock ordering across distributed nodes
Documentation
//! # ash-time
//!
//! Timestamps that tell you what happened before what — even across machines.
//!
//! `ash-time` gives you a clock you can share across threads and nodes. It
//! ticks with the wall clock when it can, and uses a logical counter to break
//! ties when multiple events land in the same nanosecond. The result: every
//! timestamp is strictly ordered and stays close to real time.
//!
//! ## Quick start
//!
//! ```
//! use ash_time::HlcClock;
//!
//! let clock = HlcClock::new();
//!
//! // Sender: stamp every outgoing message.
//! let send_ts = clock.now().unwrap();
//!
//! // Receiver: advance local clock on every incoming message.
//! let recv_ts = clock.recv(send_ts).unwrap();
//!
//! // Causality check: send happened before receive.
//! assert!(send_ts.happened_before(recv_ts));
//! ```

pub mod hlc;

pub use hlc::{HlcClock, HlcError, HlcTimestamp};