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]
impl TimevalⓘImportant traits for &'a mut Rpub fn get_time_of_day(&mut self) -> &mut Self[src]
pub fn get_time_of_day(&mut self) -> &mut SelfObtain the current wallclock timestamp, just like UNIX gettimeofday().
pub fn diff(a: &Self, b: &Self) -> MicroSeconds[src]
pub fn diff(a: &Self, b: &Self) -> MicroSecondsCalculate the difference between the two specified timeval structs.
pub fn age(&self) -> MicroSeconds[src]
pub fn age(&self) -> MicroSecondsReturn the time difference between now and self
pub fn add(&mut self, t: MicroSeconds)[src]
pub fn add(&mut self, t: MicroSeconds)Add the specified time in microseconds
pub fn sub(&mut self, t: MicroSeconds)[src]
pub fn sub(&mut self, t: MicroSeconds)Subtract the specified time in microseconds
pub fn set(&mut self, t: MicroSeconds)[src]
pub fn set(&mut self, t: MicroSeconds)Set the specified usec value
Trait Implementations
impl Copy for Timeval[src]
impl Copy for Timevalimpl Clone for Timeval[src]
impl Clone for Timevalfn clone(&self) -> Timeval[src]
fn clone(&self) -> TimevalReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl PartialEq for Timeval[src]
impl PartialEq for Timevalfn eq(&self, other: &Self) -> bool[src]
fn eq(&self, other: &Self) -> boolThis 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]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl Eq for Timeval[src]
impl Eq for Timevalimpl Ord for Timeval[src]
impl Ord for Timevalfn cmp(&self, other: &Self) -> Ordering[src]
fn cmp(&self, other: &Self) -> OrderingThis method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src]
fn max(self, other: Self) -> SelfCompares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
fn min(self, other: Self) -> SelfCompares and returns the minimum of two values. Read more
impl PartialOrd for Timeval[src]
impl PartialOrd for Timevalfn partial_cmp(&self, other: &Self) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool1.0.0[src]
fn lt(&self, other: &Rhs) -> boolThis 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]
fn le(&self, other: &Rhs) -> boolThis 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]
fn gt(&self, other: &Rhs) -> boolThis 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]
fn ge(&self, other: &Rhs) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl Debug for Timeval[src]
impl Debug for Timevalfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl From<Timeval> for MicroSeconds[src]
impl From<Timeval> for MicroSecondsimpl From<MicroSeconds> for Timeval[src]
impl From<MicroSeconds> for Timevalfn from(t: MicroSeconds) -> Self[src]
fn from(t: MicroSeconds) -> SelfPerforms the conversion.