Struct TimerFd
pub struct TimerFd {
inner: AsyncFd<Wrapper>,
}Expand description
A timer file descriptor.
See the module level documentation for more details.
Fields§
§inner: AsyncFd<Wrapper>Implementations§
§impl TimerFd
impl TimerFd
fn as_inner(&self) -> &InnerTimerFd
pub fn get(&self) -> Result<Option<Expiration>>
pub fn get(&self) -> Result<Option<Expiration>>
Returns the current expiration time of the timer.
pub fn set(
&self,
expiration: Expiration,
flags: TimerSetTimeFlags,
) -> Result<()>
pub fn set( &self, expiration: Expiration, flags: TimerSetTimeFlags, ) -> Result<()>
Sets the expiration time of the timer.
pub fn set_one_shot(
&self,
duration: Duration,
flags: TimerSetTimeFlags,
) -> Result<()>
pub fn set_one_shot( &self, duration: Duration, flags: TimerSetTimeFlags, ) -> Result<()>
Sets the timer to expire once after the given duration.
This is a convenience method calling set with a OneShot expiration.
pub fn set_interval(
&self,
duration: Duration,
flags: TimerSetTimeFlags,
) -> Result<()>
pub fn set_interval( &self, duration: Duration, flags: TimerSetTimeFlags, ) -> Result<()>
Sets the timer to expire repeatedly with the given interval.
This is a convenience method calling set with an Interval
expiration.
Auto Trait Implementations§
impl Freeze for TimerFd
impl !RefUnwindSafe for TimerFd
impl Send for TimerFd
impl Sync for TimerFd
impl Unpin for TimerFd
impl !UnwindSafe for TimerFd
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more