Hadith 8246

وَقَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ : " لَا يَزَالُ أَحَدُكُمْ فِي صَلَاةٍ مَا كَانَتْ الصَّلَاةُ هِيَ تَحْبِسُهُ ، لَا يَمْنَعُهُ إِلَّا انْتِظَارُهَا " .
And the Prophet Muhammad (peace and blessings be upon him) said: As long as a person waits for the prayer, he is counted as being in prayer. It is the waiting for the prayer that keeps him detained in the mosque.
Hadith Reference مسند احمد / مسند المكثرين من الصحابة / 8246
Hadith Grading حکم دارالسلام: إسناده صحيح، خ: 477، م: 649