Clean and slice the mushrooms. Slice or finely chop the garlic. Thinly slice the onions.
Set a cast iron or stainless steel pan on high heat. Once hot, add half of the olive oil and mushrooms with a pinch of salt.
Cook for about 15 to 20 minutes, stirring occasionally until the mushrooms have received a hard sear and are browned on both sides. Bring heat down to medium-low.
Add the onions, garlic, thyme, salt, and remaining olive oil. Stir everything together.
Stir again every 5 to 10 minutes for approximately 50 minutes, or until the onions are deeply browned, soft, and sweet. Add a bit more oil as needed if the pan looks dry.
Taste for seasoning and serve.