I’m trying to sync up what happens on my screen to an external device. Currently, I make a call to DateTime.UtcNow
in the OnGUI()
function of my gui object. I’m wondering about the accuracy of such an approach. It would be great if there was some way to get a precise timestamp right after the low level OpenGL SwapBuffers
call.
You could try OnPostRender and/or WaitForEndOfFrame, but it’s always going to be hard to know precisely when the user actually sees the pixels you render, since you don’t know what the display driver and display hardware are actually doing.