diff --git a/src/time.rs b/src/time.rs index e5287362f6..8b4c2d2a7a 100644 --- a/src/time.rs +++ b/src/time.rs @@ -56,7 +56,12 @@ impl ClockId { self.0 } - #[cfg(any(linux_android, target_os = "emscripten", target_os = "fuchsia"))] + #[cfg(any( + linux_android, + target_os = "emscripten", + target_os = "fuchsia", + target_os = "openbsd", + ))] /// Starts at zero when the kernel boots and increments monotonically in SI seconds while the /// machine is running. pub const CLOCK_BOOTTIME: ClockId = ClockId(libc::CLOCK_BOOTTIME); @@ -89,6 +94,7 @@ impl ClockId { freebsdlike, target_os = "emscripten", target_os = "fuchsia", + target_os = "openbsd", target_os = "redox", ))] /// Returns the execution time of the calling process. @@ -139,11 +145,12 @@ impl ClockId { freebsdlike, target_os = "emscripten", target_os = "fuchsia", + target_os = "openbsd", ))] /// Returns the execution time of the calling thread. pub const CLOCK_THREAD_CPUTIME_ID: ClockId = ClockId(libc::CLOCK_THREAD_CPUTIME_ID); - #[cfg(freebsdlike)] + #[cfg(any(freebsdlike, target_os = "openbsd"))] /// Starts at zero when the kernel boots and increments monotonically in SI seconds while the /// machine is running. pub const CLOCK_UPTIME: ClockId = ClockId(libc::CLOCK_UPTIME);