Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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);
Expand Down