Skip to content

cf_set_fixed_timestep

Category: time
GitHub: cute_time.h


Sets the frequency for fixed timestep updates to occur.

void cf_set_fixed_timestep(int frames_per_second);
Parameters Description
frames_per_second The frequency for fixed-timestep updates to occur, e.g. 30 is a good default number. Set to 0 to disable fixed timestep.

Remarks

Often times a fixed-timestep can occur multiple times in one frame. In this case, CF_OnUpdateFn will be called once per update to simulate a fixed-timestep (see CF_OnUpdateFn and cf_update_time). The max number of updates possible is clamped below cf_set_fixed_timestep_max_updates.

cf_set_target_framerate
cf_set_fixed_timestep_max_updates
cf_update_time
CF_DELTA_TIME_FIXED
CF_DELTA_TIME_INTERPOLANT