The frametime_timer was restarted at the end of the update method, instead of immediately after reading its value. This means that the frametime was lower than expected when an expensive task was executed in-between.