An iPhone can stay in recovery mode for about fifteen minutes. After that, if no actions are performed, it will exit the recovery mode.