#include <include/flecs.h> FLECS_API void ecs_set_target_fps(ecs_world_t *world, FLECS_FLOAT fps)
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.
world- The world.
fps- The target FPS.