MediaContextClock
struct · ferroui-base · v0.5.0
struct MediaContextClock
The global animation clock: pulsed once per frame by the media context with the time elapsed since the media context started.
Subscribing schedules a render pass, so that the clock keeps ticking while anything observes it.
Members
has_new_subscriptions
fn has_new_subscriptions(self: &Self) -> bool
Whether observers subscribed since the last pulse.
has_subscriptions
fn has_subscriptions(self: &Self) -> bool
Whether anything is waiting for the next pulse.
request_animation_frame
fn request_animation_frame(self: &Self, action: impl FnOnce(SignedDuration) -> () + 'static)
Runs action with the frame time on the next pulse.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnySubscribeGuard<T>ErasedDestructorIntoEitherIObservable<SignedDuration>IClockIGlobalClock
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.