Record onset/offset times in online experiments / PsychJS

Hi @Stuart_Furnell,

thanks for the response!

I implemented your solution but the values that were saved were all quite small (e.g., 0.0001) so I suspect that the tStart refers to the onset of the corresponding Component since the onset of the Routine. This would make sense, since all Components of all my Routines start with the onset of the respective Routine.

However, I wanted to save a single onset time for each Routine (sorry, that was not very clear in my original question). I now achieved that by using your code but replacing stimulus.tStart with globalClock.getTime() to get the global time at each Routine onset. By saving the onset time of each Routine I can later figure out the approximate duration of each Routine, which is what I needed.

So thanks again @Stuart_Furnell for the valuable hint! Cheers!

1 Like