The longer those cook, the sweeter and more caramelized they will become. A little balsamic vinegar is a nice touch to add.
Heat oil in a 10-inch skillet over medium heat. Add onions. Cook, tossing occasionally, until beginning to brown, about 5 minutes.
Sprinkle with sugar; season with salt and pepper. Add 2/3 cup water and thyme; cook, stirring occasionally, until onions are tender and liquid has evaporated, about 20 minutes.