Crates.io | clock_source |
lib.rs | clock_source |
version | 0.2.4 |
source | src |
created_at | 2022-01-18 10:06:16.509563 |
updated_at | 2022-04-22 03:31:42.511843 |
description | set a common clock source |
homepage | |
repository | https://github.com/rise0chen/clock_source.git |
max_upload_size | |
id | 516119 |
size | 13,126 |
Add this to your Cargo.toml
:
[dependencies]
clock_source = "*"
let now: u64 = clock_source::now();
[dependencies]
clock_source = { version = "*", features = ["custom"] }
static SOURCE: fn() -> u64 = || 1;
clock_source::register_clock_source!(SOURCE);
assert_eq!(clock_source::now(), 1);