Salim bin Abi al-Ja'd narrates that Sayyiduna Ibn Mas'ud (may Allah be pleased with him) entered the mosque and said: The Messenger of Allah (peace and blessings be upon him) said: "Among the signs of the Hour is that a man passes through the length and breadth of the mosque without praying two rak'ahs in it."
Mansur narrated it in this way, while Qatadah narrated it with a connected chain.
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 9455