in a large skillet, heat 1 tbsp of the oil over medium-high heat. Add both onions and cook covered, stirring occasionally until no liquid remains and onions are soft, about 6 minutes.
Stir in sugar, vinegar and 1/4 tsp each of the salt and pepper; cook, stirring until onions are dark golden, 7 to 9 minutes. Stir in 2 thyme sprigs and transfer to a plate.