Abstract out framerate measuring