diff --git a/Cargo.toml b/Cargo.toml index c177c22..80f0d4e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ edition = "2018" [dependencies] libc = { version = "0.2", default-features = false } -libc-print = "0.1.22" +libc-print = "0.1.23" errno = { version = "*", default-features = false } [profile.dev] diff --git a/src/tm.rs b/src/tm.rs index 4641dab..efabf77 100644 --- a/src/tm.rs +++ b/src/tm.rs @@ -7,6 +7,7 @@ pub(crate) struct Timespec { pub(crate) ts: timespec, } +#[cfg(test)] pub(crate) fn new_timespec() -> Timespec { Timespec { ts: timespec { @@ -15,6 +16,7 @@ pub(crate) fn new_timespec() -> Timespec { }, } } + impl Sub for Timespec { type Output = Duration;