Modified dtime calculation method in limitFps()