There is no time limit between two trips to Thailand. That said, the Royal Thai Embassy reserves the right to refuse the request for tourist visa for any person who has stayed more than 90 days during the last six months preceding the date of submission of the visa application.