#include <include/flecs.h> FLECS_API FLECS_FLOAT ecs_frame_begin(ecs_world_t *world, FLECS_FLOAT delta_time)
Begin frame. When an application does not use ecs_progress to control the main loop, it can still use Flecs features such as FPS limiting and time measurements. This operation needs to be invoked whenever a new frame is about to get processed.
The function accepts a delta_time parameter, which will get passed to systems. This value is also used to compute the amount of time the function needs to sleep to ensure it does not exceed the target_fps, when it is set. When 0 is provided for delta_time, the time will be measured.
This function should only be ran from the main thread.
world- The world.
delta_time- Time elapsed since the last frame.
- The provided delta_time, or measured time if 0 was provided.