Put diced onions and brown sugar in a heavy pot over medium heat.
Cook uncovered for 45-60 minutes, stirring frequently, until onions start to brown and caramelize and any liquid has evaporated
Add wine, vinegar, thyme, salt and pepper and bring to a boil.
Reduce heat and simmer for 45-60 minutes until liquid has reduced and thickened.
You could refrigerate the jam at this point, it should keep for about 2 weeks.
If you chose to can it, spoon your jam into hot, sterilized half-pint jars, leaving a 1/2" headspace.
Process for 10 minutes in your hot water bath.
Take pot lid off, let sit for 5 minutes then place on wire rack to sit undisturbed for 24 hours.
Please consult the Ball Blue Book Guide to Preserving or the National Center for Home Food Preservation at http://nchfp.uga.edu/ for detailed instruction on canning. This recipe presumes knowledge of the necessary steps for water bath canning.