#[repr(C)]pub struct SimulationTime(/* private fields */);Implementations§
Source§impl SimulationTime
 
impl SimulationTime
Sourcepub const MAX: SimulationTime
 
pub const MAX: SimulationTime
Maximum value. Currently equivalent to SIMTIME_MAX to avoid surprises when interoperating with C, but could use Duration::MAX when the C types go away.
pub const ZERO: SimulationTime
pub const SECOND: SimulationTime
pub const MILLISECOND: SimulationTime
pub const MICROSECOND: SimulationTime
pub const NANOSECOND: SimulationTime
pub fn from_c_simtime(val: CSimulationTime) -> Option<Self>
pub fn to_c_simtime(val: Option<Self>) -> CSimulationTime
Sourcepub const fn from_duration(val: Duration) -> Self
 
pub const fn from_duration(val: Duration) -> Self
Convert a Duration to a SimulationTime. This function exists as a const
alternative to SimulationTime::try_from(duration). May panic if the duration is too large.
pub fn is_zero(&self) -> bool
pub fn is_positive(&self) -> bool
pub fn as_secs(&self) -> u64
pub fn as_millis(&self) -> u64
pub fn as_micros(&self) -> u64
pub fn as_nanos(&self) -> u128
pub fn as_nanos_f64(&self) -> f64
pub fn checked_add(self, other: Self) -> Option<Self>
pub fn checked_sub(self, other: Self) -> Option<Self>
pub fn checked_mul(self, other: u64) -> Option<Self>
pub fn checked_div(self, other: u64) -> Option<Self>
pub fn checked_rem(self, other: Self) -> Option<Self>
pub fn saturating_add(self, other: Self) -> Self
pub fn saturating_sub(self, other: Self) -> Self
pub fn saturating_mul(self, other: u64) -> Self
pub fn try_from_secs(s: u64) -> Option<Self>
pub fn from_secs(s: u64) -> Self
pub fn try_from_millis(s: u64) -> Option<Self>
pub fn from_millis(s: u64) -> Self
pub fn try_from_micros(s: u64) -> Option<Self>
pub fn from_micros(s: u64) -> Self
pub fn try_from_nanos(s: u64) -> Option<Self>
pub fn from_nanos(s: u64) -> Self
pub fn subsec_millis(&self) -> u32
pub fn subsec_micros(&self) -> u32
pub fn subsec_nanos(&self) -> u32
Trait Implementations§
Source§impl Add<SimulationTime> for EmulatedTime
 
impl Add<SimulationTime> for EmulatedTime
Source§type Output = EmulatedTime
 
type Output = EmulatedTime
The resulting type after applying the 
+ operator.Source§fn add(self, other: SimulationTime) -> Self
 
fn add(self, other: SimulationTime) -> Self
Performs the 
+ operation. Read moreSource§impl Add for SimulationTime
 
impl Add for SimulationTime
Source§impl AddAssign<SimulationTime> for EmulatedTime
 
impl AddAssign<SimulationTime> for EmulatedTime
Source§fn add_assign(&mut self, rhs: SimulationTime)
 
fn add_assign(&mut self, rhs: SimulationTime)
Performs the 
+= operation. Read moreSource§impl AddAssign for SimulationTime
 
impl AddAssign for SimulationTime
Source§fn add_assign(&mut self, rhs: SimulationTime)
 
fn add_assign(&mut self, rhs: SimulationTime)
Performs the 
+= operation. Read moreSource§impl Clone for SimulationTime
 
impl Clone for SimulationTime
Source§fn clone(&self) -> SimulationTime
 
fn clone(&self) -> SimulationTime
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moreSource§impl Debug for SimulationTime
 
impl Debug for SimulationTime
Source§impl Div<u32> for SimulationTime
 
impl Div<u32> for SimulationTime
Source§impl DivAssign<u32> for SimulationTime
 
impl DivAssign<u32> for SimulationTime
Source§fn div_assign(&mut self, rhs: u32)
 
fn div_assign(&mut self, rhs: u32)
Performs the 
/= operation. Read moreSource§impl Duration for SimulationTime
 
impl Duration for SimulationTime
Source§const NANOSECOND: Self = Self::NANOSECOND
 
const NANOSECOND: Self = Self::NANOSECOND
Source§const MICROSECOND: Self = Self::MICROSECOND
 
const MICROSECOND: Self = Self::MICROSECOND
Source§const MILLISECOND: Self = Self::MILLISECOND
 
const MILLISECOND: Self = Self::MILLISECOND
Source§fn checked_add(self, rhs: Self) -> Option<Self>
 
fn checked_add(self, rhs: Self) -> Option<Self>
Source§fn checked_div(self, rhs: u32) -> Option<Self>
 
fn checked_div(self, rhs: u32) -> Option<Self>
Source§fn checked_mul(self, rhs: u32) -> Option<Self>
 
fn checked_mul(self, rhs: u32) -> Option<Self>
Source§fn checked_sub(self, rhs: Self) -> Option<Self>
 
fn checked_sub(self, rhs: Self) -> Option<Self>
Source§fn from_micros(micros: u64) -> Self
 
fn from_micros(micros: u64) -> Self
Source§fn from_millis(millis: u64) -> Self
 
fn from_millis(millis: u64) -> Self
Source§fn from_nanos(nanos: u64) -> Self
 
fn from_nanos(nanos: u64) -> Self
Source§fn saturating_add(self, rhs: Self) -> Self
 
fn saturating_add(self, rhs: Self) -> Self
Source§fn saturating_mul(self, rhs: u32) -> Self
 
fn saturating_mul(self, rhs: u32) -> Self
Source§fn saturating_sub(self, rhs: Self) -> Self
 
fn saturating_sub(self, rhs: Self) -> Self
Source§fn subsec_micros(&self) -> u32
 
fn subsec_micros(&self) -> u32
Source§fn subsec_millis(&self) -> u32
 
fn subsec_millis(&self) -> u32
Source§fn subsec_nanos(&self) -> u32
 
fn subsec_nanos(&self) -> u32
Source§impl From<SimulationTime> for Duration
 
impl From<SimulationTime> for Duration
Source§fn from(val: SimulationTime) -> Duration
 
fn from(val: SimulationTime) -> Duration
Converts to this type from the input type.
Source§impl From<SimulationTime> for CSimulationTime
 
impl From<SimulationTime> for CSimulationTime
Source§fn from(val: SimulationTime) -> CSimulationTime
 
fn from(val: SimulationTime) -> CSimulationTime
Converts to this type from the input type.
Source§impl Hash for SimulationTime
 
impl Hash for SimulationTime
Source§impl Mul<u32> for SimulationTime
 
impl Mul<u32> for SimulationTime
Source§impl MulAssign<u32> for SimulationTime
 
impl MulAssign<u32> for SimulationTime
Source§fn mul_assign(&mut self, rhs: u32)
 
fn mul_assign(&mut self, rhs: u32)
Performs the 
*= operation. Read moreSource§impl Ord for SimulationTime
 
impl Ord for SimulationTime
Source§fn cmp(&self, other: &SimulationTime) -> Ordering
 
fn cmp(&self, other: &SimulationTime) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
    Self: Sized,
 
fn max(self, other: Self) -> Selfwhere
    Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SimulationTime
 
impl PartialEq for SimulationTime
Source§impl PartialOrd for SimulationTime
 
impl PartialOrd for SimulationTime
Source§impl Rem for SimulationTime
 
impl Rem for SimulationTime
Source§type Output = SimulationTime
 
type Output = SimulationTime
The resulting type after applying the 
% operator.Source§impl Sub<SimulationTime> for EmulatedTime
 
impl Sub<SimulationTime> for EmulatedTime
Source§type Output = EmulatedTime
 
type Output = EmulatedTime
The resulting type after applying the 
- operator.Source§fn sub(self, other: SimulationTime) -> Self
 
fn sub(self, other: SimulationTime) -> Self
Performs the 
- operation. Read moreSource§impl Sub for SimulationTime
 
impl Sub for SimulationTime
Source§impl SubAssign<SimulationTime> for EmulatedTime
 
impl SubAssign<SimulationTime> for EmulatedTime
Source§fn sub_assign(&mut self, rhs: SimulationTime)
 
fn sub_assign(&mut self, rhs: SimulationTime)
Performs the 
-= operation. Read moreSource§impl SubAssign for SimulationTime
 
impl SubAssign for SimulationTime
Source§fn sub_assign(&mut self, rhs: SimulationTime)
 
fn sub_assign(&mut self, rhs: SimulationTime)
Performs the 
-= operation. Read moreSource§impl TryFrom<Duration> for SimulationTime
 
impl TryFrom<Duration> for SimulationTime
Source§impl TryFrom<SimulationTime> for kernel_old_timeval
 
impl TryFrom<SimulationTime> for kernel_old_timeval
Source§impl TryFrom<SimulationTime> for kernel_timespec
 
impl TryFrom<SimulationTime> for kernel_timespec
Source§impl TryFrom<SimulationTime> for timespec
 
impl TryFrom<SimulationTime> for timespec
Source§impl TryFrom<SimulationTime> for timeval
 
impl TryFrom<SimulationTime> for timeval
Source§impl TryFrom<SimulationTime> for timespec
 
impl TryFrom<SimulationTime> for timespec
Source§impl TryFrom<SimulationTime> for timeval
 
impl TryFrom<SimulationTime> for timeval
Source§impl TryFrom<linux_timespec> for SimulationTime
 
impl TryFrom<linux_timespec> for SimulationTime
Source§impl TryFrom<linux_timeval> for SimulationTime
 
impl TryFrom<linux_timeval> for SimulationTime
Source§impl TryFrom<timespec> for SimulationTime
 
impl TryFrom<timespec> for SimulationTime
Source§impl TryFrom<timeval> for SimulationTime
 
impl TryFrom<timeval> for SimulationTime
impl Copy for SimulationTime
impl Eq for SimulationTime
impl StructuralPartialEq for SimulationTime
Auto Trait Implementations§
impl Freeze for SimulationTime
impl RefUnwindSafe for SimulationTime
impl Send for SimulationTime
impl Sync for SimulationTime
impl Unpin for SimulationTime
impl UnwindSafe for SimulationTime
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more