pub struct RelativeTime { /* private fields */ }Expand description
Implementations§
Source§impl RelativeTime
impl RelativeTime
Sourcepub fn new_time(time_sec: i64, time_nsec: i64) -> Self
pub fn new_time(time_sec: i64, time_nsec: i64) -> Self
Creates new instance for relative time accepting the user input.
Automatically corrects the time_nsec value if it is larger than
999_999_999ns.
§Arguments
time_sec - i64 a seconds in relative notation.
time_nsec - i64 nanoseconds of relative seconds value. Should not be
larger than 999_999_999 which is defined by const Self::MAX_NS. In
case if it is larger, the nsec will be rounded and an extra secons
will be added.
pub fn is_zero(&self) -> bool
Trait Implementations§
Source§impl Add<RelativeTime> for AbsoluteTime
impl Add<RelativeTime> for AbsoluteTime
Source§type Output = AbsoluteTime
type Output = AbsoluteTime
+ operator.Source§impl Add<RelativeTime> for TimerExpMode<AbsoluteTime>
impl Add<RelativeTime> for TimerExpMode<AbsoluteTime>
Source§type Output = TimerExpMode<AbsoluteTime>
type Output = TimerExpMode<AbsoluteTime>
+ operator.Source§impl AddAssign<RelativeTime> for AbsoluteTime
impl AddAssign<RelativeTime> for AbsoluteTime
Source§fn add_assign(&mut self, rhs: RelativeTime)
fn add_assign(&mut self, rhs: RelativeTime)
+= operation. Read moreSource§impl AddAssign<RelativeTime> for TimerExpMode<AbsoluteTime>
impl AddAssign<RelativeTime> for TimerExpMode<AbsoluteTime>
Source§fn add_assign(&mut self, rhs: RelativeTime)
fn add_assign(&mut self, rhs: RelativeTime)
+= operation. Read moreSource§impl Clone for RelativeTime
impl Clone for RelativeTime
Source§fn clone(&self) -> RelativeTime
fn clone(&self) -> RelativeTime
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RelativeTime
impl Debug for RelativeTime
Source§impl Display for RelativeTime
impl Display for RelativeTime
Source§impl From<(i64, i64)> for RelativeTime
Converts the tuple (i64, i64) (seconds, nsec) to RelativeTime ignoring
the subsec_nanos fraction and setting it to zero.
impl From<(i64, i64)> for RelativeTime
Converts the tuple (i64, i64) (seconds, nsec) to RelativeTime ignoring
the subsec_nanos fraction and setting it to zero.
Source§impl From<Duration> for RelativeTime
Converts the Duration to RelativeTime taking the subsec_nanos
for the time_nsec.
impl From<Duration> for RelativeTime
Converts the Duration to RelativeTime taking the subsec_nanos
for the time_nsec.
Source§impl From<RelativeTime> for Duration
impl From<RelativeTime> for Duration
Source§fn from(value: RelativeTime) -> Self
fn from(value: RelativeTime) -> Self
Source§impl From<i64> for RelativeTime
Converts the i64 (seconds) to RelativeTime ignoring
the subsec_nanos fraction and setting it to zero.
impl From<i64> for RelativeTime
Converts the i64 (seconds) to RelativeTime ignoring
the subsec_nanos fraction and setting it to zero.
Source§impl From<timespec> for RelativeTime
impl From<timespec> for RelativeTime
Source§impl From<u128> for RelativeTime
Converts the u128 (MSB:seconds|LSB:nanosec) to RelativeTime by
separationg MSB seconds from nanoseconds
impl From<u128> for RelativeTime
Converts the u128 (MSB:seconds|LSB:nanosec) to RelativeTime by separationg MSB seconds from nanoseconds
Source§impl From<u64> for RelativeTime
Converts the u64 (seconds) to RelativeTime ignoring
the subsec_nanos fraction and setting it to zero.
impl From<u64> for RelativeTime
Converts the u64 (seconds) to RelativeTime ignoring
the subsec_nanos fraction and setting it to zero.
Source§impl ModeTimeType for RelativeTime
impl ModeTimeType for RelativeTime
Source§fn get_nsec(&self) -> i64
fn get_nsec(&self) -> i64
Source§fn is_value_valid(&self) -> bool
fn is_value_valid(&self) -> bool
Source§fn get_flags() -> TimerSetTimeFlags
fn get_flags() -> TimerSetTimeFlags
Source§impl Ord for RelativeTime
impl Ord for RelativeTime
Source§impl PartialEq for RelativeTime
impl PartialEq for RelativeTime
Source§impl PartialOrd for RelativeTime
impl PartialOrd for RelativeTime
Source§impl Sub<RelativeTime> for AbsoluteTime
impl Sub<RelativeTime> for AbsoluteTime
Source§type Output = AbsoluteTime
type Output = AbsoluteTime
- operator.Source§impl SubAssign<RelativeTime> for AbsoluteTime
impl SubAssign<RelativeTime> for AbsoluteTime
Source§fn sub_assign(&mut self, rhs: RelativeTime)
fn sub_assign(&mut self, rhs: RelativeTime)
-= operation. Read more