I downloaded this sample:
I commented out this line in AAPLViewController.mm
// _view.enableSetNeedsDisplay = YES;
I modified the presentDrawable line in AAPLRenderer.mm to add afterMinimumDuration:
[commandBuffer presentDrawable:drawable afterMinimumDuration:1.0/60];
I then added a presentedHandler before the above line that records the time between successive presents.
Most of the time it correctly reports 0.166667s. However, about every dozen or so frames (it varies) it seems to present a frame early with an internal of 0.0083333333s followed by the next frame after around 0.24s.
Is this expected behaviour, I was hoping that afterMinimumDuration would specifically make things consistent. Why would it present a frame early?
This is on a new MacBook Pro 16 running latest macOS Monterrey, and the sample project upgraded to have a minimum deployment target of 11.0. Xcode latest public release 13.1.