We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b169d58 commit 1eb5733Copy full SHA for 1eb5733
src/time.rs
@@ -37,6 +37,7 @@ impl ClockId {
37
}
38
39
/// Returns resolution of the clock id
40
+ #[cfg(not(target_os = "redox"))]
41
pub fn res(self) -> Result<TimeSpec> {
42
clock_getres(self)
43
@@ -204,6 +205,7 @@ impl std::fmt::Display for ClockId {
204
205
206
/// Get the resolution of the specified clock, (see
207
/// [clock_getres(2)](https://pubs.opengroup.org/onlinepubs/7908799/xsh/clock_getres.html)).
208
+#[cfg(not(target_os = "redox"))]
209
pub fn clock_getres(clock_id: ClockId) -> Result<TimeSpec> {
210
let mut c_time: MaybeUninit<libc::timespec> = MaybeUninit::uninit();
211
let ret = unsafe { libc::clock_getres(clock_id.as_raw(), c_time.as_mut_ptr()) };
0 commit comments