I’m coding a new experiment and have a really strange bug that I haven’t seen before. I used to always control the presentation time of items on the screen by flipping the window a certain amount of times, depending of the refresh rate of the monitor. So if I want to present a fixation cross on the screen for 500 ms. with a 60Hz monitor:
fixCross.setAutoDraw(True) # Draw a fixation cross
for i in range(30): # Flip 30 times for 500 ms
mywin.flip()
fixCross.setAutoDraw(False) # Remove it
For some strange reason, this does not work properly anymore, it is not shown on screen for 0.5s but 0.1741s.
Hi Christophe, I tried changing the window type but the error persists. I also discovered something else:
If I run the code above in a loop (10 times), and track the timings I get:
Well yes, I have a reason for that, first of all because it is more precise, but in another part of my experiment it is actually also crucial (but I won’t go into detail).
I’ve always use this technique to flip the window, it has always worked, but now all of a sudden not anymore. It seems to me like it’s behaving as if I’m using a monitor with a higher refresh rate (but I’m not).
I would like to figure out how to get this working again.
Are you using Mac OS 12 Monterey? That release enabled variable refresh rate for relatively new Macs, but there seems to be some issues with the implementation of this feature.
What does the timing look like if you run your PsychoPy task in a window that isn’t full-screen (not usually good practice but it might help diagnose the issue if VRR is operating)?