t2:elapsed_time

elapsed_time


elapsed_time - Get elapsed time

Description


uint32 elapsed_time();

Get the elapsed time as the number of milli-seconds since previous interaction of main.

Return Value


Returns the number of milli-seconds that has being passed since previous interaction.

Examples


Example #1 elapsed_time() example

uint32 time_counter;
 
main {
    time_counter += elapsed_time();
    if(time_counter >= 10000) {
        time_counter = 0;
        combo_run(PressButton16);
    }
}
 
combo PressButton16 {
    set_val(BUTTON_16, 100.0);
    wait(100);
}

See Also

t2/elapsed_time.txt · Last modified: 2016/12/01 06:14 by J2Kbr