Timing

Added the ability to compensate for lag when waiting for the next animation frame.
Also the frame rate displayer now adds the time it took to animate the frame to the total FPS.