The Prophet (ﷺ) said, "As long as any-one of you is waiting for the prayer, he is considered to be praying
actually, and the angels say, 'O Allah! Be merciful to him and forgive him', (and go on saying so)
unless he leaves his place of praying or passes wind (i.e. breaks his ablution).
Sahih al-Bukhari Book 59, Hadith 40