End routine after specified time

Thank you for your quick reply!

I implemented your suggestions and now I don’t get a syntax error but the routine does not end after 6 minutes…

The code now looks like this:

if t>=360:

Could it be affected by the nReps value for the loop? Because I set it to 5 to make sure, that no participant will finish the routine before the timer has ended. There are no error prompts or something like that.