void mav_frameEnd(void);
This function also calculates the wallclock time elapsed between calling mav_frameBegin and when the buffers have been swapping by this function. The reciprocal of this value, the frame-rate, is stored in the global variable mav_fps.
For high frame rates (short elapsed time) this value will inevitably fluctuate from frame to frame due to variations in system load and the resolution and inaccuracies of the internal clock. The global variable mav_fps_avg gives the frame rate averaged over the last second and does not suffer from these problems.
Any rendering that occurs after this function is called, and before the next call to mav_frameBegin, will be lost.