pub struct MediaClock { /* private fields */ }Expand description
gPTP time, read through the monotonic clock.
Implementations§
Source§impl MediaClock
impl MediaClock
Sourcepub fn open(index: Option<u32>) -> Result<Self>
pub fn open(index: Option<u32>) -> Result<Self>
The clock of the interface’s PTP hardware clock index, or the
monotonic clock alone when there is none: streams then flow, but
their presentation times mean nothing to other entities.
Sourcepub fn set_correction(&self, nanoseconds: i64)
pub fn set_correction(&self, nanoseconds: i64)
Adds nanoseconds to the hardware clock’s time from now on, in
place of what was added before.
Sourcepub fn monotonic_at(&self, gptp: i64) -> Duration
pub fn monotonic_at(&self, gptp: i64) -> Duration
The monotonic time at which gPTP time reaches gptp nanoseconds.
Auto Trait Implementations§
impl !Freeze for MediaClock
impl RefUnwindSafe for MediaClock
impl Send for MediaClock
impl Sync for MediaClock
impl Unpin for MediaClock
impl UnsafeUnpin for MediaClock
impl UnwindSafe for MediaClock
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