Function set_main_loop_timing

Source
pub fn set_main_loop_timing(timing: &MainLoopTiming) -> bool
Expand description

Applies the given main loop timing parameters to the main loop.

It returns:

  • true if the main loop function is set.
  • false if the main loop function isn’t set.

If you’re only interested in seeing whether the main loop function is set or not, check out the is_main_loop_set function.

§Arguments

  • timing - the timing parameters to apply to the main loop.

§Examples

set_main_loop_timing(MainLoopTiming::SetTimeout(33));
// the main function will now run at ~30fps