Struct libpulse_binding::timeval::Timeval
[−]
[src]
#[repr(C)]pub struct Timeval(pub timeval);
Wrapper for libc::timeval, providing trait impls
Warning, this must remain directly transmutable with the inner libc::timeval
Methods
impl Timeval[src]
ⓘImportant traits for &'a mut Wpub fn get_time_of_day(&mut self) -> &mut Self[src]
Obtain the current wallclock timestamp, just like UNIX gettimeofday().
pub fn diff(a: &Self, b: &Self) -> MicroSeconds[src]
Calculate the difference between the two specified timeval structs.
pub fn age(&self) -> MicroSeconds[src]
Return the time difference between now and self
pub fn add(&mut self, t: MicroSeconds)[src]
Add the specified time in microseconds
pub fn sub(&mut self, t: MicroSeconds)[src]
Subtract the specified time in microseconds
pub fn set(&mut self, t: MicroSeconds)[src]
Set the specified usec value
Trait Implementations
impl Copy for Timeval[src]
impl Clone for Timeval[src]
fn clone(&self) -> Timeval[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl PartialEq for Timeval[src]
fn eq(&self, other: &Self) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
This method tests for !=.
impl Eq for Timeval[src]
impl Ord for Timeval[src]
fn cmp(&self, other: &Self) -> Ordering[src]
This method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
Compares and returns the minimum of two values. Read more
impl PartialOrd for Timeval[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>[src]
This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool1.0.0[src]
This method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, other: &Rhs) -> bool1.0.0[src]
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, other: &Rhs) -> bool1.0.0[src]
This method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, other: &Rhs) -> bool1.0.0[src]
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl Debug for Timeval[src]
fn fmt(&self, f: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl From<Timeval> for MicroSeconds[src]
impl From<MicroSeconds> for Timeval[src]
fn from(t: MicroSeconds) -> Self[src]
Performs the conversion.