Struct kernel::common::time::Duration
[−]
[src]
pub struct Duration {
pub secs: i64,
pub nanos: i32,
}A duration
Fields
secs | The seconds |
nanos | The nano seconds |
Methods
impl Duration
fn new(secs: i64, nanos: i32) -> Self
Create a new duration
fn monotonic() -> Self
Get the current duration
fn realtime() -> Self
Get the realtime
fn sleep(&self)
Sleep the duration