Hi There,
The columns with the headers ‘text.started’ and ‘text.stopped’ refer to the onset and offset time of the text component (not a routine). But each routine does have it’s own clock (i.e. a routine called routine1 has a corresponding instance “under the hood” called routine1Clock).
The important thing here, is that when you look at the difference between each timestamp, the values are approximately similar. The difference between your two values come from the zero point of your clocks.
To help figure out the zero points of your clocks compile the experiment to code.
For your own clock, that is easy, myTimer
is made on line 86, essentially the same point in the code where your routine1Clock is made actually… So we know the zero point of that, but what about the onset/offset saving of each component?
We can see on line 186 where the data are saved.
thisExp.addData('text.started', text.tStartRefresh)
thisExp.addData('text.stopped', text.tStopRefresh)
What is text.tStartRefresh
?..you can see on line 129 that the values are initialized as “None” (which probably explains why they are saved as none if nothing overwrites this):
thisComponent.tStartRefresh = None
thisComponent.tStopRefresh = None
On line 159 these values are set using win.timeOnFlip():
text.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(text, 'tStartRefresh') # time at next scr refresh
But what are the zero points of these timers?
Looks like the save onset/offset box uses core.monotonicClock Add timing audit data to .csv output files · Issue #2187 · psychopy/psychopy · GitHub
The zero point of core.monotonicClock is the time when core was imported psychopy.core - basic functions (clocks etc.) — PsychoPy v2021.1
If we wanted to check this, we could save core.monotonicClock.getTime() at the start of your routine, that will probably get a near identical answer to your text start time.
So, in short which clock you use depends on what you want your zero point to be.
Do you want it when core was imported? In which case the onset of your components are helpful (or use core.monotonicClock)
Do you want it to be when your experiment begins ? in which case use your custom clock that is created when the experiment begins.
Do you want it to be when a routine begins? In which case use the custom clocks that underlie each routine (i.e. routine1Clock)
Sorry for the info dense response - but hopefully this is helpful to those trying to understand what different timestamps mean in their experiments!
Becca