Recording stimulus start and stop time when running online

When I’m running my experiment locally, I can see the start and stop time for each stimulus presentation in the .csv output file. However, I don’t see these data in the output file when I’m running it online.

In the python file, I see that the following lines are used to add the start and stop times.

TrainTD.addData('TrainResp.started', TrainResp.tStartRefresh)
TrainTD.addData('TrainResp.stopped', TrainResp.tStopRefresh)

How can I add something equivalent to this in the js file to also record the start and stop time for my online experiment?

Thank you!

You’ll need to define your own clock (see my crib sheet or code snippets) and save the time on that clock at the points you need.