Busr bin Sa'id narrated: Abu Juhaym al-Ansari (may Allah be pleased with him) sent me to Sayyiduna Zayd bin Khalid al-Juhani (may Allah be pleased with him) to ask him what he had heard from the Messenger of Allah (peace and blessings be upon him) about a man who passes in front of someone praying. He said: I heard him (peace and blessings be upon him) say: "For the one passing to remain standing in his place for forty would be better for him than to pass in front of someone praying." The narrator said: I do not know whether he said forty years, forty months or forty days.
Hadith Referenceالمعجم الكبير للطبراني / باب الزاي / 5216