Draw on vbi, get time

Godot Version

Any version

Question

I would like to have the flipping of the back and front buffer done synchronized with the vertical blanking interval, so that when flipped, the right front-buffer will be available at the next refresh. is this possible in godot ? and if yes, is there a way to log the time at which the flip happened, perhaps because a blocking window.flip() command was released ?

In other words, I would like to know when a stimulus is likely to have appeared on the screen, without always having to refer to a photodiode on the monitor. So any other way of achieving this is fine too.

Thanks !