Skip to main content

TimerService

Trait TimerService 

Source
pub trait TimerService {
    // Required methods
    fn start_timer(&mut self, interval_ms: u32, repeat: bool) -> TimerId;
    fn stop_timer(&mut self, timer: TimerId);
    fn request_frame(&mut self);
    fn now(&self) -> f64;
}
Expand description

Timers e frames (como IFMXTimerService).

Required Methods§

Source

fn start_timer(&mut self, interval_ms: u32, repeat: bool) -> TimerId

Source

fn stop_timer(&mut self, timer: TimerId)

Source

fn request_frame(&mut self)

Pede um frame (usado pelas animações; só enquanto houver animação ativa).

Source

fn now(&self) -> f64

Relógio monotônico em segundos.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§