pub struct Time {
pub nsec: i64,
pub clock: Weak<Mutex<rcl_clock_s>>,
}
Expand description
Struct that represents time.
Fields§
§nsec: i64
Timestamp in nanoseconds.
clock: Weak<Mutex<rcl_clock_s>>
Weak reference to the clock that generated this time
Implementations§
Source§impl Time
impl Time
Sourcepub fn compare_with<U, F>(&self, rhs: &Time, f: F) -> Option<U>
pub fn compare_with<U, F>(&self, rhs: &Time, f: F) -> Option<U>
Compares self to rhs, if they can be compared (originated from the same clock) calls f with the values of the timestamps.
Sourcepub fn to_ros_msg(&self) -> Result<Time, TryFromIntError>
pub fn to_ros_msg(&self) -> Result<Time, TryFromIntError>
Convenience function for converting time to ROS message
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Time
impl RefUnwindSafe for Time
impl Send for Time
impl Sync for Time
impl Unpin for Time
impl UnwindSafe for Time
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