pub struct Clock { /* private fields */ }Expand description
A monotonic clock for stamping media frames so that tracks produced concurrently, e.g. an audio and a video capture running on separate threads, land on a single timeline.
Create one Clock and sample it (micros) from each
producer: because they share an epoch, frames captured at the same instant
get the same timestamp, keeping the tracks in sync. It is Copy, so it’s
cheap to hand to several producers.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Clock
impl RefUnwindSafe for Clock
impl Send for Clock
impl Sync for Clock
impl Unpin for Clock
impl UnsafeUnpin for Clock
impl UnwindSafe for Clock
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