pub struct Scheduler { /* private fields */ }Expand description
A scheduler that manages the execution of scheduled tasks.
Implementations§
Source§impl Scheduler
impl Scheduler
Sourcepub fn set_time_scale(&mut self, val: f32)
pub fn set_time_scale(&mut self, val: f32)
Sets the time scale factor for the scheduler. This factor is applied to deltaTime that the scheduled functions will receive.
Sourcepub fn get_time_scale(&self) -> f32
pub fn get_time_scale(&self) -> f32
Gets the time scale factor for the scheduler. This factor is applied to deltaTime that the scheduled functions will receive.
Sourcepub fn set_fixed_fps(&mut self, val: i32)
pub fn set_fixed_fps(&mut self, val: i32)
Sets the target frame rate (in frames per second) for a fixed update mode. The fixed update will ensure a constant frame rate, and the operation handled in a fixed update can use a constant delta time value. It is used for preventing weird behavior of a physics engine or synchronizing some states via network communications.
Sourcepub fn get_fixed_fps(&self) -> i32
pub fn get_fixed_fps(&self) -> i32
Gets the target frame rate (in frames per second) for a fixed update mode. The fixed update will ensure a constant frame rate, and the operation handled in a fixed update can use a constant delta time value. It is used for preventing weird behavior of a physics engine or synchronizing some states via network communications.