In a large skillet, combine onions, butter, sugar, and 1 1/2 cups water; bring to a boil. Reduce to a simmer, and cook over medium-low, stirring occasionally, until onions begin to soften and liquid has evaporated, 15 to 20 minutes.
Continue to cook until golden, about 8 minutes, tossing occasionally. Add 1/4 cup water, and cook until onions are glazed, about 10 minutes more. Remove from heat, and stir in vinegar and thyme.
Prepare onions, omitting vinegar and thyme, up to 1 day ahead; refrigerate. Reheat with 1/2 cup water over medium heat; stir in vinegar and thyme.