Added code behind the FPS counter.