You need to define what time that is. Time in current trial? Time in overall experiment? If the latter, what is the zero point and does it matter? Currently you are using
core.getAbsTime(), the number of seconds since Jan 1970, which might be overkill.
You need to tell us what tab in the code component any code is in (i.e. does it run at the start of the experiment, start of the trial, etc)
# not necessary. Builder already imports this:
from psychopy import core
# this returns a time value in seconds, not a clock object:
clock = core.getAbsTime()
Note that Builder already creates a few clocks for you, which you can query the time from:
globalClock = core.Clock() # to track the time since experiment started
trialClock = core.Clock() # resets to zero at the start of each trial
You can add a time stamp to the data file like this:
but you really need to tell us more about exactly what times you want to record and when.