setTimeout based ping logic