pub unsafe extern "C" fn ecs_set_target_fps(
world: *mut ecs_world_t,
fps: f32,
)Expand description
Set target frames per second (FPS) for application. Setting the target FPS ensures that ecs_progress is not invoked faster than the specified FPS. When enabled, ecs_progress tracks the time passed since the last invocation, and sleeps the remaining time of the frame (if any).
This feature ensures systems are ran at a consistent interval, as well as conserving CPU time by not running systems more often than required.
Note that ecs_progress only sleeps if there is time left in the frame. Both time spent in flecs as time spent outside of flecs are taken into account.
@param world The world. @param fps The target FPS.