Sayyiduna Uqbah bin Amir al-Juhani (may Allah be pleased with him) narrates from the Prophet (peace and blessings be upon him): "When a man performs ablution and then walks to the mosque, mindful of the prayer, his two recording angels write for him ten good deeds for every step he takes towards the mosque. And the one who sits waiting for the prayer is like one standing in prayer, and he is recorded among those praying from the time he leaves his house until he returns."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4974