clock_source

set a common clock source

7 releases

0.2.4 Apr 22, 2022
0.2.3 Mar 7, 2022
0.2.2 Feb 21, 2022
0.2.1 Jan 19, 2022
0.1.1 Jan 18, 2022
Download history 12/week @ 2024-07-01 10/week @ 2024-07-08 40/week @ 2024-07-15 9/week @ 2024-07-22 42/week @ 2024-07-29 24/week @ 2024-08-05 18/week @ 2024-08-12 19/week @ 2024-08-19 28/week @ 2024-08-26 20/week @ 2024-09-02 20/week @ 2024-09-09 17/week @ 2024-09-16 38/week @ 2024-09-23 16/week @ 2024-09-30 1/week @ 2024-10-07 23/week @ 2024-10-14

78 downloads per month
Used in 10 crates (5 directly)

Custom license

12KB

clock_source

Usage

Add this to your Cargo.toml:

[dependencies]
clock_source = "*"
let now: u64 = clock_source::now();

custom clock source

[dependencies]
clock_source = { version = "*", features = ["custom"] }
static SOURCE: fn() -> u64 = || 1;
clock_source::register_clock_source!(SOURCE);
assert_eq!(clock_source::now(), 1);

Dependencies