jonls/freeserf — pull request #80 by jonls (2013-06-04 09:09:23+00:00)
Title: Fix #79: throttle to target framerate properly

Decouple FPS computation and framerate targetting: simply sleep() each
frame if we finished too early, regardless of the observed framerate.
This removes fluctuations between sleeping because of FPS and sleeping
affecting the FPS itself.

Also fix framerate and EMA computation, now they produce correct
results using floating-point ema.