Sunan Ibn Majah Book 5, Hadith 141
“When
anyone of you performs prayer, let him put something in front of him.
If he cannot find anything then let him put a stick. If he cannot
find
one, then let him draw a line. Then it will not matter if
anything
passes in front of him.”
“The Messenger of Allah had a reed mat that he would spread out during the day, and make into a compartment at night, towards which he would perform prayer.”
“They sent me to Zaid bin Khalid to ask him about passing in front of one who is performing prayer. He told me that the Prophet (ﷺ) said: ‘Waiting for forty is better than passing in front of one who is performing prayer.’”
(One of the narrators) Sufyan said: "I do not know if he meant forty years, months, days, or hours."