Struct pipewire::TimerSource[][src]

pub struct TimerSource<'l> { /* fields omitted */ }
Expand description

A source that can be used to have a callback called on a timer.

This source can be obtained by calling add_timer on a loop, registering a callback to it.

The timer starts out inactive. You can arm or disarm the timer by calling update_timer.

Implementations

Arm or disarm the timer.

The timer will be called the next time after the provided value duration. After that, the timer will be repeatedly called again at the the specified interval.

If interval is None or zero, the timer will only be called once.
If value is None or zero, the timer will be disabled.

Panics

The provided durations seconds must fit in an i64. Otherwise, this function will panic.

Trait Implementations

Executes the destructor for this type. Read more

Return a valid pointer to a raw spa_source.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.