clock_source
Usage
Add this to your Cargo.toml
:
[]
= "*"
let now: u64 = now;
custom clock source
[]
= { = "*", = ["custom"] }
static SOURCE: fn = ;
register_clock_source!;
assert_eq!;
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);