[][src]Struct linux::time::timer::Timer

pub struct Timer { /* fields omitted */ }

A timer.

Methods

impl Timer[src]

pub fn disable(&self) -> Result[src]

Disables the timer.

pub fn interval(&self, iv: Time) -> Result[src]

Sets the timer to expire every iv time units.

pub fn interval_from(&self, iv: Time, start: Time) -> Result[src]

Sets the timer to expire every iv time units, starting at the absolute start.

pub fn interval_in(&self, iv: Time, when: Time) -> Result[src]

Sets the timer to expire every iv time units, starting in when units.

pub fn once_at(&self, when: Time) -> Result[src]

Sets the timer to expire once at the absolute when.

pub fn once_in(&self, when: Time) -> Result[src]

Sets the timer to expire in when time units.

pub fn status(&self) -> Result<(Time, Time)>[src]

Returns the status of the timer.

TODO: Document this.

pub fn ticks(&self) -> Result<u64>[src]

Returns the number of times the timer expired since this function was last called.

Trait Implementations

impl FdContainer for Timer[src]

Important traits for FdIo
fn as_fdio(&self) -> FdIo[src]

Borrows the file descriptor as an FdIo.

fn is_close_on_exec(&self) -> Result<bool>[src]

Retrieves the status of the close on exec flag. Read more

fn set_close_on_exec(&self, val: bool) -> Result[src]

Enables or disables the close on exec flag. Read more

fn description_flags(&self) -> Result<DescriptionFlags>[src]

Retrieves the file description flags. Read more

fn set_description_flags(&self, flags: DescriptionFlags) -> Result[src]

Sets the file description flags. Read more

fn duplicate(&self) -> Result<Self> where
    Self: Sized
[src]

Duplicates the file descriptor. Read more

fn duplicate_min(&self, min: c_int) -> Result<Self> where
    Self: Sized
[src]

Duplicates the file descriptor so that the duplicated one has a minimum value. Read more

fn duplicate_as(&self, new: c_int) -> Result<Self> where
    Self: Sized
[src]

Duplicates the file descriptor, replacing an existing one. Read more

impl Drop for Timer[src]

impl From<Timer> for c_int[src]

Auto Trait Implementations

impl Send for Timer

impl Sync for Timer

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]