Abu Hurairah narrated that
The Messenger of Allah (peace be upon him) said: “Whoever sits in a sitting and engages in much empty, meaningless speech and then says before getting from that sitting of his: ‘Glory is to You, O Allah, and praise, I bear witness that there is none worthy of worship except You, I seek You forgiveness, and I repent to You, (Subḥānaka Allāhumma wa biḥamdika, ashhadu an lā ilāha illā anta, astaghfiruka wa atūbu ilaik)’ whatever occurred in that sitting would be forgiven to him.”
( Jami aTirmidhi )