summaryrefslogtreecommitdiffstats
path: root/vendor/rustix/src/backend/libc/time/types.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/rustix/src/backend/libc/time/types.rs')
-rw-r--r--vendor/rustix/src/backend/libc/time/types.rs22
1 files changed, 17 insertions, 5 deletions
diff --git a/vendor/rustix/src/backend/libc/time/types.rs b/vendor/rustix/src/backend/libc/time/types.rs
index 47cd85701..c78aeb21a 100644
--- a/vendor/rustix/src/backend/libc/time/types.rs
+++ b/vendor/rustix/src/backend/libc/time/types.rs
@@ -108,7 +108,7 @@ impl From<Timespec> for LibcTimespec {
/// `CLOCK_*` constants for use with [`clock_gettime`].
///
-/// These constants are always supported at runtime so `clock_gettime` never
+/// These constants are always supported at runtime, so `clock_gettime` never
/// has to fail with `INVAL` due to an unsupported clock. See
/// [`DynamicClockId`] for a greater set of clocks, with the caveat that not
/// all of them are always supported.
@@ -153,7 +153,7 @@ pub enum ClockId {
/// `CLOCK_*` constants for use with [`clock_gettime`].
///
-/// These constants are always supported at runtime so `clock_gettime` never
+/// These constants are always supported at runtime, so `clock_gettime` never
/// has to fail with `INVAL` due to an unsupported clock. See
/// [`DynamicClockId`] for a greater set of clocks, with the caveat that not
/// all of them are always supported.
@@ -209,7 +209,11 @@ pub enum DynamicClockId<'a> {
BoottimeAlarm,
}
-/// `struct itimerspec`
+/// `struct itimerspec` for use with [`timerfd_gettime`] and
+/// [`timerfd_settime`].
+///
+/// [`timerfd_gettime`]: crate::time::timerfd_gettime
+/// [`timerfd_settime`]: crate::time::timerfd_settime
#[cfg(any(target_os = "android", target_os = "fuchsia", target_os = "linux"))]
#[cfg(not(all(
any(target_arch = "arm", target_arch = "mips", target_arch = "x86"),
@@ -217,7 +221,11 @@ pub enum DynamicClockId<'a> {
)))]
pub type Itimerspec = c::itimerspec;
-/// `struct itimerspec`
+/// `struct itimerspec` for use with [`timerfd_gettime`] and
+/// [`timerfd_settime`].
+///
+/// [`timerfd_gettime`]: crate::time::timerfd_gettime
+/// [`timerfd_settime`]: crate::time::timerfd_settime
#[cfg(any(target_os = "android", target_os = "fuchsia", target_os = "linux"))]
#[cfg(all(
any(target_arch = "arm", target_arch = "mips", target_arch = "x86"),
@@ -286,6 +294,8 @@ impl From<Itimerspec> for LibcItimerspec {
#[cfg(any(target_os = "android", target_os = "fuchsia", target_os = "linux"))]
bitflags! {
/// `TFD_*` flags for use with [`timerfd_create`].
+ ///
+ /// [`timerfd_create`]: crate::time::timerfd_create
pub struct TimerfdFlags: c::c_int {
/// `TFD_NONBLOCK`
const NONBLOCK = c::TFD_NONBLOCK;
@@ -298,6 +308,8 @@ bitflags! {
#[cfg(any(target_os = "android", target_os = "fuchsia", target_os = "linux"))]
bitflags! {
/// `TFD_TIMER_*` flags for use with [`timerfd_settime`].
+ ///
+ /// [`timerfd_settime`]: crate::time::timerfd_settime
pub struct TimerfdTimerFlags: c::c_int {
/// `TFD_TIMER_ABSTIME`
const ABSTIME = c::TFD_TIMER_ABSTIME;
@@ -316,7 +328,7 @@ bitflags! {
#[repr(i32)]
#[non_exhaustive]
pub enum TimerfdClockId {
- /// `CLOCK_REALTIME`—A clock that tells the "real" time.
+ /// `CLOCK_REALTIME`—A clock that tells the “real” time.
///
/// This is a clock that tells the amount of time elapsed since the
/// Unix epoch, 1970-01-01T00:00:00Z. The clock is externally settable, so