hashgraph-like-consensus 0.6.0

A lightweight Rust library for making binary decisions in networks using hashgraph-style consensus
Documentation
1
2
3
4
5
6
7
8
9
10
//! Helpers shared by the crate's inline test modules.

/// Current time in seconds since Unix epoch — the caller-supplied `now`
/// the library expects.
pub(crate) fn now_ts() -> u64 {
    std::time::SystemTime::now()
        .duration_since(std::time::UNIX_EPOCH)
        .unwrap()
        .as_secs()
}