pub struct spa_io_clock {
Show 15 fields pub flags: u32, pub id: u32, pub name: [c_char; 64], pub nsec: u64, pub rate: spa_fraction, pub position: u64, pub duration: u64, pub delay: i64, pub rate_diff: f64, pub next_nsec: u64, pub target_rate: spa_fraction, pub target_duration: u64, pub target_seq: u32, pub padding: u32, pub xrun: u64,
Expand description

Absolute time reporting.

Nodes that can report clocking information will receive this io block. The application sets the id. This is usually set as part of the position information but can also be set separately.

The clock counts the elapsed time according to the clock provider since the provider was last started.


§flags: u32

< clock flags

§id: u32

< unique clock id, set by application

§name: [c_char; 64]

< clock name prefixed with API, set by node. The clock name is unique per clock and can be used to check if nodes share the same clock.

§nsec: u64

< time in nanoseconds against monotonic clock

§rate: spa_fraction

< rate for position/duration/delay/xrun

§position: u64

< current position

§duration: u64

< duration of current cycle

§delay: i64

< delay between position and hardware, positive for capture, negative for playback

§rate_diff: f64

< rate difference between clock and monotonic time

§next_nsec: u64

< estimated next wakeup time in nanoseconds

§target_rate: spa_fraction

< target rate of next cycle

§target_duration: u64

< target duration of next cycle

§target_seq: u32

< seq counter. must be equal at start and end of read and lower bit must be 0

§padding: u32§xrun: u64

< estimated accumulated xrun duration

Trait Implementations§


impl Clone for spa_io_clock


fn clone(&self) -> spa_io_clock

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

impl Debug for spa_io_clock


fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

impl PartialEq for spa_io_clock


fn eq(&self, other: &spa_io_clock) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

impl Copy for spa_io_clock


impl StructuralPartialEq for spa_io_clock

Auto Trait Implementations§

Blanket Implementations§


impl<T> Any for T
where T: 'static + ?Sized,


fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T
where T: ?Sized,


fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T
where T: ?Sized,


fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more

impl<T> From<T> for T


fn from(t: T) -> T

Returns the argument unchanged.


impl<T, U> Into<U> for T
where U: From<T>,


fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.


impl<T> ToOwned for T
where T: Clone,


type Owned = T

The resulting type after obtaining ownership.

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T
where U: Into<T>,


type Error = Infallible

The type returned in the event of a conversion error.

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,


type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.