Site Tools
Sidebar
User's Manual
t2:macro_time
macro_time
macro_time - Get macro time
Description
int32 macro_time();
Get the time as the number of milli-seconds the macro file is running or recording since initiated by macro_run
or macro_rec
.
Return Value
Returns the number of milli-seconds that the macro file is running or recording, or -1 if there is no active macro operation.
Examples
Example #1 macro_time() example
main { // If BUTTON_2 is pressed ... if(event_active(BUTTON_2)) { // ... run the macro "Example". macro_run("Example.gmk"); } // If the macro is running for over 2000 ms ... if(macro_time() > 2000) { // ... stop it immediately. macro_stop(); } }
See Also
t2/macro_time.txt · Last modified: 2018/06/27 04:51 by J2Kbr