| Reference | Downloads | Github

Get total experiment time for the online version

I added psychoJS.experiment.addData(“globalClockTime”, globalClock.getTime())
in end experiment in order to get total experiment time, but it doesn’t seem to work. It seems that I don’t get a globalClockTime column in the output datafile. What should i do? Thanks!!

@CatK, currently the code will not be written in the “End JS Experiment” tab (fix pending) but in the mean time, if you add the following to the “End JS Routine” tab of your final routine in your task, you will get the final time of the experiment at the end of the final routine, which will be equivalent to having it at the end of the experiment:

psychoJS.experiment.addData(“globalClockTime”, globalClock.getTime());