Abul-Juhaim 'Abdullah bin Al-Harith (May Allah be pleased with him) said:
The Messenger of Allah (ﷺ) said, "If the person who passes in front of a praying person, realizes the enormity of the sinfulness of this act, it will have been better for him to wait forty than to pass in front of him."[Al-Bukhari and Muslim].[The narrator was not sure whether the Prophet (ﷺ) said forty days, months or years.] (ID)
App reference (ID): Book 18, Hadith 248 (ID)
Arabic/English book reference (ID): Book 18, Hadith 1758 (ID)