Here is an example.
REPEAT VSYNC INC TIME UNTIL BUTTON()==#[button name] OR TIME==120 IF BUTTON()==#[button name] THEN PRINT "Success" ELSE PRINT "Failure..."In this example, 120 frames is the time window. Let's explain this. REPEAT just signifies the start of a REPEAT UNTIL loop. it loops until it reaches the end and a condition is met the loop is ended with UNTIL, which you specify the end condition(s) after. INC this just increases the specified value, nothing special. I think you can figure out IF and ELSE pretty easily.