In a large pot, heat butter and olive oil over medium heat.
Add sliced onions and cook until softened, about 10 minutes.
Sprinkle sugar over the onions to help caramelize.
Continue cooking for another 15 minutes until deep golden brown.
Pour in the broth and bring to a simmer.
Stir in the rice and thyme, then cover the pot.
Reduce heat and cook for 20 minutes or until rice is tender.
Season with salt and pepper to taste.
Transfer the rice mixture to an oven-safe dish, top with Gruyère cheese, and broil until melted and bubbly.