I want to output start and stop time for stimulus phase. in online

Description of the problem:
Hi! I want to get time data.
Flow of my experiment:
1.Gaze point(400ms)
2.appear stimulus(1000ms)

I want to data of time(stimulus start and stop)

I write psychopy’s code component(ending routine)

(beginnig exp)

but, it cannot output stoptime.

What should I do?

Isn’t stop-time essentially start-time + 1000ms?

But, I want to know time lag .

As in the lag between how long the stimulus should have been on the screen and how long it actually was on the screen?

Yes, I want to know it.

As far as I know, there isn’t any way to get the timestamp of the moment that PsychoJS requests the stimulus to be hidden again (the stop-time so to say) from within Builder. You’d need to edit the generated JS for that.

However, I’ve also got good news. Based on the results of my own timing study, I can say that start and stop time don’t tell you how long a stimulus is actually on the screen; they only tell you when we requested this to the browser. See the section on “internal chronometry” in this paper: Mental chronometry in the pocket? Timing accuracy of web applications on touchscreen and keyboard devices - PubMed