What passing in front of someone praying costs
The unit is left unstated on purpose.
لَوْ يَعْلَمُ الْمَارُّ بَيْنَ يَدَىِ الْمُصَلِّي مَاذَا عَلَيْهِ لَكَانَ أَنْ يَقِفَ أَرْبَعِينَ خَيْرًا لَهُ مِنْ أَنْ يَمُرَّ بَيْنَ يَدَيْهِ
Law yaʿlamu-l-mārru bayna yaday-l-muṣallī mādhā ʿalayhi la-kāna an yaqifa arbaʿīna khayran lahu min an yamurra bayna yadayh
If the one who passes in front of a person praying knew what it costs him, standing still for forty would be better for him than passing in front of him.
Where this comes from
The narrator says he does not know whether he said forty days, or months, or years. He left it as a number with no unit, and the point survives either way.
The full narration
Narrated Busr bin Sa`id:that Zaid bin Khalid sent him to Abi Juhaim to ask him what he had heard from Allah's Messenger (ﷺ) about a person passing in front of another person who was praying. Abu Juhaim replied, "Allah's Messenger (ﷺ) said, 'If the person who passes in front of another person in prayer knew the magnitude of his sin he would prefer to wait for 40 (days, months or years) rather than to pass in front of him." Abu An-Nadr said, "I do not remember exactly whether he said 40 days, months or years
Source
Ṣaḥīḥ al-Bukhārī · 510
- Agreed upon as authentic (al-Bukhārī / Muslim)