TO MAKE THE SYRUP: Combine the sugar and water in a small saucepan and place over medium heat.
Whisk to dissolve the sugar then add thyme. Bring to a simmer and cook, 2 minutes.
Remove from heat, cover, and let steep for 1 hour. Then strain and chill. Keep the syrup covered in the fridge for 1 month.
TO MAKE THE MARGARITA: Rub the lime wedge around the rim of a cocktail glass.
Dip glass in salt to coat the edges. Fill glass with crushed ice.
Fill cocktail shaker with ice, add tequila, tangerine juice, syrup, and lime juice and shake vigorously.
Strain drink into prepared glass and garnish with a thyme sprig.