Fix for framerate calculation screwing up over time - this seems to fix it.