diff options
author | Ryan Zoeller <rtzoeller@rtzoeller.com> | 2022-01-31 22:45:21 -0600 |
---|---|---|
committer | Ryan Zoeller <rtzoeller@rtzoeller.com> | 2022-02-02 17:53:52 -0600 |
commit | 7baf6d12c88bfba20b77c68353826702c7248fcd (patch) | |
tree | 2165bcc78191155143de8d86f4e865b4a6f8b457 /src/sys | |
parent | d3ff2666d699fd839e8ef530ad8d5bcea568dcff (diff) | |
download | nix-7baf6d12c88bfba20b77c68353826702c7248fcd.zip |
Document timerfd.rs
Diffstat (limited to 'src/sys')
-rw-r--r-- | src/sys/mod.rs | 1 | ||||
-rw-r--r-- | src/sys/timerfd.rs | 11 |
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; } } |