Struct timerfd::TimerFd [] [src]

pub struct TimerFd(_);

Represents a timerfd.

See also timerfd_create(2).

Methods

impl TimerFd
[src]

Creates a new TimerFd.

By default, it uses the monotonic clock, is blocking and does not close on exec. The parameters allow you to change that.

Errors

On Linux 2.6.26 and earlier, nonblocking and cloexec are not supported and setting them will return an error of kind ErrorKind::InvalidInput.

This can also fail in various cases of resource exhaustion. Please check timerfd_create(2) for details.

Creates a new TimerFd with default settings.

Use new_custom to specify custom settings.

Sets this timerfd to a given TimerState and returns the old state.

Returns the current TimerState.

Read from this timerfd.

Returns the number of timer expirations since the last read. If this timerfd is operating in blocking mode (the default), it will not return zero but instead block until the timer has expired at least once.

Trait Implementations

impl AsRawFd for TimerFd
[src]

Extracts the raw file descriptor. Read more

impl Drop for TimerFd
[src]

A method called when the value goes out of scope. Read more