psychopy/psychopy — pull request #111 by lindeloev (2012-02-25 15:52:48+00:00)
Title: new visual.Window method: multiFlip()

I don't know if I should have posted this on dev-list for discussion before submitting pull-request? Anyway, the problem I try to solve here is that I always find myself timing brief presentations of stimuli using:

for frame in range(3):
stim.draw()
win.flip()

With the multiFlip() method, this can be done like this:

stim.draw()
win.multiflip(3)

... which is also more efficient, since it does not draw the stimulus to buffer before every flip. Another advantage is that this method is easier to understand for first-time users, who often have difficulties understanding the range()-method and hence revert to core.wait()-based methods for timing.

Best,
Jonas