Trait zng_var::animation::AnimationTimer

source ·
pub trait AnimationTimer {
    // Required methods
    fn elapsed(&mut self, deadline: Deadline) -> bool;
    fn register(&mut self, deadline: Deadline);
    fn now(&self) -> DInstant;
}
Expand description

View on an app loop timer.

Required Methods§

source

fn elapsed(&mut self, deadline: Deadline) -> bool

Returns true if the deadline has elapsed, false if the deadline was registered for future waking.

source

fn register(&mut self, deadline: Deadline)

Register the future deadline for waking.

source

fn now(&self) -> DInstant

Frame timestamp.

Implementors§