Skip to content

Commit

Permalink
fix with_system_time arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
museun committed Apr 20, 2023
1 parent 84e724b commit d9afb74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ mod reference {
*TIME.get_or_init(Mutex::default).lock().unwrap()
}

pub fn with_system_time() -> Duration {
pub fn with_system_time(d: impl Fn(&mut Duration)) -> Duration {
let t = SYSTEM_TIME.get_or_init(Mutex::default);
let mut t = t.lock().unwrap();
d(&mut t);
Expand Down

0 comments on commit d9afb74

Please sign in to comment.