ENOfficial
Abu Juhaim reported God’s Messenger as saying, ‘‘If one who passes in front of a man who is praying knew the responsibility he incurs, to stand still for forty would be better for him than to pass in front of him.” Abun Nadr said, “I do not know whether he said forty days, or months, or years.” (Bukhari and Muslim.)
Source: sunnah.com
Other translations
Arabic
وَعَن أبي جهيم قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسلم: «لَوْ يَعْلَمُ الْمَارُّ بَيْنَ يَدَيِ الْمُصَلِّي مَاذَا عَلَيْهِ لَكَانَ أَنْ يَقِفَ أَرْبَعِينَ خَيْرًا لَهُ مِنْ أَنْ يَمُرَّ بَيْنَ يَدَيْهِ» . قَالَ أَبُو النَّضر: لَا أَدْرِي قَالَ: «أَرْبَعِينَ يَوْمًا أَوْ شَهْرًا أَو سنة»
sunnah.com