FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    Clock

    struct · ferroui-base · v0.5.0

    struct Clock
    

    A clock that runs on another clock: its time starts at zero on the first tick of the parent after it was created, and stands still while it is paused.

    The clock subscribes to its parent when it is created, whether or not anything is subscribed to it, and unsubscribes on the first tick after its play state was set to PlayState::Stop.

    View source

    Members

    global_clock

    fn global_clock() -> Rc<dyn IClock>
    

    The global clock: the dyn IGlobalClock service.

    Panics when no global clock is registered.

    Source

    new

    fn new() -> Rc<Clock>
    

    Creates a clock that runs on the global clock.

    Source

    with_parent

    fn with_parent(parent: &Rc<dyn IClock>) -> Rc<Clock>
    

    Creates a clock that runs on parent.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.