Hi @giannis_let,
I suggest you simply use a thread with a counter that will be running as a timer:
Main Program
timer = 0
...
cycle_time = timer
Thread
timer = timer + 0.008
sync()
Note that if you're running on an e-Series you should increment by 0.002s.
Is there an option inside the polyscope to export the cycle time of the simulated robot? I run a script and the simulated movement is perfect, but where is the cycle time estimation data?