OS: Windows 10
PsychoPy 2020.2.10
What are you trying to achieve?:
I want to save the time when something happens (a message is received) in the data Excel file.
I tried the following code:
Thank you very much for your reply, very helpful!!
Exactly!! Thanks to your explanation I thought that I will save the time at which the code component is started (using “.started”) and then add the time at which (the message is received) it is saved using “t” (which from what I understood is the internal clock of the Routine) or is it not correct? This way I think I can get the time when the “message” is received in reference to the global clock, right?
Hi Becca,
I have one routine called “trial1” that only has a code component called “code_1”.
I would like to save the time when the “code_1” component starts or the trial1 routine starts and finishes.
Hi Lucia,
Ah! I don’t think code components actually get written as a component to your script - the code within the component is simply written as code itself not as a component - so it doesn’t have a start time and stop time.
I didn’t know that the code is not considered as a component, but makes sense! Thank you very much for this useful information! Can I save the start time and stop time for the whole routine “trial1”?
Yes you should be able to! if in the begin routine you write: startTime = trial1Clock.getTime() and in the endRoutine write endTime = trial1Clock.getTime() then save those values