Struct linux_api::time::timeval
[−]
[src]
pub struct timeval { pub tv_sec: time_t, pub tv_usec: suseconds_t, }
A structure that contains the number of seconds and microseconds since an epoch.
If in doubt, assume we're talking about the UNIX epoch.
Fields
tv_sec: time_t
The number of seconds contained in this timeval
tv_usec: suseconds_t
The number of microseconds contained in this timeval
Methods
impl timeval
[src]
fn new() -> timeval
[−]
Creates a new timeval with both values defaulting to zero
fn from_seconds(seconds: time_t) -> timeval
[−]
Creates a new timeval from the specified number of seconds
fn to_milliseconds(&self) -> i64
[−]
Gets a representation of this timeval as a number of milliseconds
fn to_seconds(&self) -> i64
[−]
Gets a representation of this timeval as a number of seconds
fn clear(&mut self)
[−]
Clears this timeval, setting each value to zero
Trait Implementations
impl Debug for timeval
[src]
impl Clone for timeval
[src]
fn clone(&self) -> timeval
[−]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[−]
Performs copy-assignment from source
. Read more