Issue with experiment timing

If this template helps then use it. If not then just delete and start from scratch.

OS (Win10):
PsychoPy version (psychopy 2020.2.10:
**Standard Standalone? y
What are you trying to achieve?:
I am trying to run my experiment in Pavelovia. The experiment runs perfectly in Psychopy locally (in my pc) but when it runs in Pavelovia all the 30 sec loops are 60sec instead. Is like if the time in pavlovia was different. Also the termination of the loops is not respected, mining that the loops keep going forever.
I have a routine that sets the clock and resets it as per suggestions from @wakecarter

Then I have a couple of loops

the control loop should runs for 16 reps (which runs forever in pavlovia)

Then each variation routine contains code that reads the time from the previous instantiated clock and if the time is more or equal to 30 then terminates the routine and the loop. here is the other issue, in my pc the 30 sec works perfectly but in Pavlovia the 30 sec is actually 60sec ???

I would start by finishing the loop before you end the routine. As written the loop finished line may never be read because the routine finishes in the previous line.

thank you wakecarter! I solved the puzzle. the glitches I have been experiencing, were due to JS, Most of the code I had was in (code type PY), when I added the auto JS for some reason the code had 60 sec instead of 30, I assume that that the 60 sec was hiding in cache some where. So I have added the correct JS to all my Py code and now everything works (so far) in Pavlovia.