#[repr(transparent)]pub struct TimeBaseId(pub u32);Expand description
A type-safe, zero-cost wrapper for an OSAL Time Base ID.
Tuple Fields§
§0: u32Implementations§
Source§impl TimeBaseId
impl TimeBaseId
Sourcepub fn get_free_run(&self) -> Result<u32>
pub fn get_free_run(&self) -> Result<u32>
Reads the value of the timebase free-running counter.
This is a lightweight way to poll a monotonically increasing timer. The absolute value is not relevant, but differences between successive calls can be used for high-resolution timing.
Trait Implementations§
Source§impl Clone for TimeBaseId
impl Clone for TimeBaseId
Source§fn clone(&self) -> TimeBaseId
fn clone(&self) -> TimeBaseId
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 TimeBaseId
impl Debug for TimeBaseId
Source§impl PartialEq for TimeBaseId
impl PartialEq for TimeBaseId
impl Copy for TimeBaseId
impl Eq for TimeBaseId
impl StructuralPartialEq for TimeBaseId
Auto Trait Implementations§
impl Freeze for TimeBaseId
impl RefUnwindSafe for TimeBaseId
impl Send for TimeBaseId
impl Sync for TimeBaseId
impl Unpin for TimeBaseId
impl UnsafeUnpin for TimeBaseId
impl UnwindSafe for TimeBaseId
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