#clock #source

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 58/week @ 2022-08-07 35/week @ 2022-08-14 42/week @ 2022-08-21 42/week @ 2022-08-28 56/week @ 2022-09-04 67/week @ 2022-09-11 38/week @ 2022-09-18 58/week @ 2022-09-25 61/week @ 2022-10-02 43/week @ 2022-10-09 17/week @ 2022-10-16 44/week @ 2022-10-23 51/week @ 2022-10-30 63/week @ 2022-11-06 54/week @ 2022-11-13 38/week @ 2022-11-20

214 downloads per month
Used in 9 crates (5 directly)

Custom license

8KB

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