Module timerfd
Expand description
A Tokio-based wrapper around the Linux timerfd API.
Compared to a conventional timer like the ones provided by tokio itself, a
timerfd is handled by the kernel.
Among other things, this means that the timer can keep running even when the
system is suspended.
When using ClockId::CLOCK_BOOTTIME_ALARM or
ClockId::CLOCK_REALTIME_ALARM, the timer can even wake the system from
suspend.
Structs§
- Time
Spec - TimerFd
- A timer file descriptor.
- Timer
SetTime Flags - Flags that are used for arming the timer.
- Wrapper 🔒
- This wrapper is needed because
AsyncFdrequires the inner type to implementAsRawFd.
Enums§
- ClockId
- The type of the clock used to mark the progress of the timer. For more details on each kind of clock, please refer to timerfd_create(2).
- Expiration
- An enumeration allowing the definition of the expiration time of an alarm, recurring or not.