display_get_timing_method

This function returns the timing method to be used for rendering your game.

The method can be one of the constants listed below:

Display Timing Method Constant
ConstantDescription
tm_sleepThe sleep margin value is the main timing method
tm_countvsyncsVsync timing is the main timing method (default for all supported platforms)
tm_systemtimingSystem timing is the main timing method

For more information on the different timing methods, please see display_set_timing_method.

 

Syntax:

display_get_timing_method();

 

Returns:

Display Timing Method Constant

 

Example:

if (display_get_timing_method() != tm_sleep)
{
    display_set_timing_method(tm_sleep);
    if (display_get_sleep_margin() != 20)
    {
        display_set_sleep_margin(20);
    }
}

The above code will check the timing method and if it's not set to tm_sleep it will be set to that and the sleep margin set to 20.