pub struct Duration;Expand description
Duration utilities for converting timecodes to wall-clock time.
Implementations§
Source§impl Duration
impl Duration
Sourcepub fn from_timecode(tc: &TimecodeValue) -> f64
pub fn from_timecode(tc: &TimecodeValue) -> f64
Convert a timecode value to elapsed time in seconds.
For 29.97 fps drop-frame, this gives accurate real-time seconds.
Sourcepub fn to_timecode(seconds: f64, fps: f32, drop_frame: bool) -> TimecodeValue
pub fn to_timecode(seconds: f64, fps: f32, drop_frame: bool) -> TimecodeValue
Convert seconds to a timecode value.
Auto Trait Implementations§
impl Freeze for Duration
impl RefUnwindSafe for Duration
impl Send for Duration
impl Sync for Duration
impl Unpin for Duration
impl UnsafeUnpin for Duration
impl UnwindSafe for Duration
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