Melt butter or margarine in a 4 quart saucepan. Stir in sugar. Cook onions over medium heat for 10 minutes, or until golden brown. Stir in flour until well blended with the onions and pan juices. Add water, wine, and beef broth;
Preheat oven to 375 degrees F (190 degrees C). Melt the butter in a large skillet over medium high heat. Place the onion in the butter and saute for 5 to 10 minutes, or until tender. Stir in the thyme and remove from heat.