Skip to content

Commit 1eb5733

Browse files
coolreader18asomers
authored andcommitted
Disable clock_getres on redox
1 parent b169d58 commit 1eb5733

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/time.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ impl ClockId {
3737
}
3838

3939
/// Returns resolution of the clock id
40+
#[cfg(not(target_os = "redox"))]
4041
pub fn res(self) -> Result<TimeSpec> {
4142
clock_getres(self)
4243
}
@@ -204,6 +205,7 @@ impl std::fmt::Display for ClockId {
204205

205206
/// Get the resolution of the specified clock, (see
206207
/// [clock_getres(2)](https://pubs.opengroup.org/onlinepubs/7908799/xsh/clock_getres.html)).
208+
#[cfg(not(target_os = "redox"))]
207209
pub fn clock_getres(clock_id: ClockId) -> Result<TimeSpec> {
208210
let mut c_time: MaybeUninit<libc::timespec> = MaybeUninit::uninit();
209211
let ret = unsafe { libc::clock_getres(clock_id.as_raw(), c_time.as_mut_ptr()) };

0 commit comments

Comments
 (0)