t2:output_time

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

t2:output_time [2021/04/01 06:23] (current)
J2Kbr created
Line 1: Line 1:
 +~~NOTOC~~
 +===== output_time =====
 +----
 +output_time - Get output elapsed time
  
 +==== Description ====
 +----
 +<code gpc2>​uint32 output_time();</​code>​
 +
 +Get the elapsed time as the number of milli-seconds since the last output data packet was sent.
 +
 +| This time information can help synchronize inputs, combos and macros with the game frame rate. |
 +
 +==== Return Value ====
 +----
 +
 +Returns the number of milli-seconds that has being passed since the last output data packet was sent.
 +
 +==== Examples ====
 +----
 +=== Example #1 output_time() example ===
 +<code gpc2>​main {
 +    if(get_val(BUTTON_2)) {
 +        if(output_time() == 0) {
 +            macro_run("​Example.gmk"​);​
 +        }
 +    }
 +}</​code>​
 +
 +==== See Also ====
 +----
 +  * [[t2:​system_time|system_time]]
 +  * [[t2:​elapsed_time|elapsed_time]]
t2/output_time.txt · Last modified: 2021/04/01 06:23 by J2Kbr