As for the last reply. I'm not sure I fully understand what we are attempting to calculate. 40 FPS works out to be 25ms, and the monitor refreshes as 16 so wouldn't that be 7ms lag for the next frame and then it would be perfect the following frame and then back to 7ms lag for the next frame? Something similar would occur for 12 FPS, 5ms lag followed by (add 83ms) then mod 16 to get another 6ms lag?
I do not think this is the case. If you have a 17 ms render time you will only miss one display frame update (if the display updates at 60 fps). If you have a 25 ms render time you will first miss one update, but then you have a 16.7 + 8.4 window to hit the next display frame update. So you hit 2/3 of the frame updates but every third frame will be a duplicate of the previous.
I think this is correct....