Skip to content

Commit 7baf6d1

Browse files
committed
Document timerfd.rs
1 parent d3ff266 commit 7baf6d1

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/sys/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ feature! {
195195
#[cfg(any(target_os = "android", target_os = "linux"))]
196196
feature! {
197197
#![feature = "time"]
198-
#[allow(missing_docs)]
199198
pub mod timerfd;
200199
}
201200

src/sys/timerfd.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,19 @@ libc_enum! {
6060
#[repr(i32)]
6161
#[non_exhaustive]
6262
pub enum ClockId {
63+
/// A settable system-wide real-time clock.
6364
CLOCK_REALTIME,
65+
/// A non-settable monotonically increasing clock.
66+
///
67+
/// Does not change after system startup.
68+
/// Does not measure time while the system is suspended.
6469
CLOCK_MONOTONIC,
70+
/// Like `CLOCK_MONOTONIC`, except that `CLOCK_BOOTTIME` includes the time
71+
/// that the system was suspended.
6572
CLOCK_BOOTTIME,
73+
/// Like `CLOCK_REALTIME`, but will wake the system if it is suspended.
6674
CLOCK_REALTIME_ALARM,
75+
/// Like `CLOCK_BOOTTIME`, but will wake the system if it is suspended.
6776
CLOCK_BOOTTIME_ALARM,
6877
}
6978
}
@@ -72,7 +81,9 @@ libc_bitflags! {
7281
/// Additional flags to change the behaviour of the file descriptor at the
7382
/// time of creation.
7483
pub struct TimerFlags: c_int {
84+
/// Set the `O_NONBLOCK` flag on the open file description referred to by the new file descriptor.
7585
TFD_NONBLOCK;
86+
/// Set the `FD_CLOEXEC` flag on the file descriptor.
7687
TFD_CLOEXEC;
7788
}
7889
}

0 commit comments

Comments
 (0)