[−][src]Struct linux::time::timer::Timer
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]
fn is_owned(&self) -> bool
[src]
fn borrow(&self) -> c_int
[src]
fn from_owned(fd: c_int) -> Timer
[src]
fn from_borrowed(fd: c_int) -> Timer
[src]
ⓘImportant traits for FdIofn 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]
Self: Sized,
Duplicates the file descriptor. Read more
fn duplicate_min(&self, min: c_int) -> Result<Self> where
Self: Sized,
[src]
Self: Sized,
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]
Self: Sized,
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
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,