I would like to start a clock at the beginning of my experiment and then at certain points throughout the experiment - write the current time of that clock to my output file. Hence I would be able to see, ‘oh this participant started this section very quickly’ etc… as a seperate thing to the RTs of specific trials.
(Oh and I have disabled all the ‘save offset.onset’ times for objects because I found these just cluttered up my output file enormously - and I would like to control what I log.
So. I created a clock in the ‘Begin experiment’ tab of an early routine in my experiment.
ExpClock = core.Clock()
And then added this line to the ‘Each frame’ tab (of the same routine):
ExpClockText.text = ExpClock.getTime()
Which all works just fine - the text object dynamically updates to show the elapsed time. Nice.
I then tried adding a similar textobject to subsequent routines and added the following to the text field of these objects within builder:
I was expecting to see the elapsed time when the routine begins (not dynamic) on this text object for any subsquent screens and then I would begin to think about capturing this variable and writing it to my output file when I wanted to.
Instead for these subsequent screens, the value displayed is always short - like a second or so - and the same for every subsequent screen - as if the clock were being reset somehow.
So my question is - how can I get a clock to begin early on and be able to reference it subsequently in different routines to see elapsed time?
Thanks for any pointers on either of these two issues.