timing issue using psychopy backend
Hi,
I programming a statistical learning experiment where I present apparent random shapes, with a hidden regular structure. While I tried out the experiment myself, it seemed that every once and a while a stimulus (or the blank display in between stimuli) was on screen longer than the others. This was confirmed when I logged the timings each time a new screen was shown. The snippet of code that I use for this part of the experiment is shown below:
If I take the timing difference between consecutive windows I consistently get outputs like shown below. While the majority of ISI is 200 ms (as expected) each sequence contains a significant number of outliers up to 500 ms. Is there something wrong in this code that can explain this?
Thanks in advance for the help

Comments
For clarity I have also inserted the code here instead of the .png files:
And an example output from the final line of code
Also the problem persists if I comment out the line where I draw the image and only show blank displays.
Someone found out that this timing issue is apparently specific to the windowed mode. Not sure why this is the case though and I still have to test it on our windows lab computers, but all timings are perefct when I run the experiment full screen
It's difficult to say where this behavior comes from in window mode, but since fullscreen mode is (at least usually, because these things are very system-dependent) fundamentally different from window it's not that strange that things work fine in fullscreen mode.
Check out SigmundAI.eu for our OpenSesame AI assistant!