summaryrefslogtreecommitdiff
path: root/src/sys
diff options
context:
space:
mode:
Diffstat (limited to 'src/sys')
-rw-r--r--src/sys/mod.rs1
-rw-r--r--src/sys/timerfd.rs11
2 files changed, 11 insertions, 1 deletions
diff --git a/src/sys/mod.rs b/src/sys/mod.rs
index 7ad819d2..151d9e9d 100644
--- a/src/sys/mod.rs
+++ b/src/sys/mod.rs
@@ -195,7 +195,6 @@ feature! {
#[cfg(any(target_os = "android", target_os = "linux"))]
feature! {
#![feature = "time"]
- #[allow(missing_docs)]
pub mod timerfd;
}
diff --git a/src/sys/timerfd.rs b/src/sys/timerfd.rs
index bc5a75d4..18acbae3 100644
--- a/src/sys/timerfd.rs
+++ b/src/sys/timerfd.rs
@@ -60,10 +60,19 @@ libc_enum! {
#[repr(i32)]
#[non_exhaustive]
pub enum ClockId {
+ /// A settable system-wide real-time clock.
CLOCK_REALTIME,
+ /// A non-settable monotonically increasing clock.
+ ///
+ /// Does not change after system startup.
+ /// Does not measure time while the system is suspended.
CLOCK_MONOTONIC,
+ /// Like `CLOCK_MONOTONIC`, except that `CLOCK_BOOTTIME` includes the time
+ /// that the system was suspended.
CLOCK_BOOTTIME,
+ /// Like `CLOCK_REALTIME`, but will wake the system if it is suspended.
CLOCK_REALTIME_ALARM,
+ /// Like `CLOCK_BOOTTIME`, but will wake the system if it is suspended.
CLOCK_BOOTTIME_ALARM,
}
}
@@ -72,7 +81,9 @@ libc_bitflags! {
/// Additional flags to change the behaviour of the file descriptor at the
/// time of creation.
pub struct TimerFlags: c_int {
+ /// Set the `O_NONBLOCK` flag on the open file description referred to by the new file descriptor.
TFD_NONBLOCK;
+ /// Set the `FD_CLOEXEC` flag on the file descriptor.
TFD_CLOEXEC;
}
}