Globally record computer's timestamp for each item
Dear OS community,
I am looking for a way, a script I believe, to automatically record the computer's timestamp whenever an item is introduced. That is, to create a new variable called "timestamp" that will log the computer's timestamp (using for example
datetime.datetime.time(datetime.datetime.now())) of every item when it starts. for example the timestamp of fixation, timestamp of stimuli, timestamp of response, timestamp of blank screen, timestamp of logger, and then again when a new trial starts, the timestamp of fixation, timestamp of stimuli etc.
I guess it could be done by adding an inline_script before each item but I wonder if there's a global way that will be more "parsimonious" in items. If not possible, I wonder if there's an automated way to calculate the computer's timestamp retrospectively by recording the timestamp at the end of the experiment and create the past timestamps according to the the structure of the experiment (using the time_ variables maybe?).
I'd be grateful for any help,