It depends on both the fungicide and how long of a time elapses between when you spray the roses and when you're planning to harvest and eat the thyme. If it's going to be a really long time before you pick it then you probably don't have to worry too much unless it's a systemic fungicide that you're applying to the roses. Otherwise, if you're planning to eat the thyme soon, then you need to use a bit more caution. I'm not as familiar with fungicides as I am with insecticides, but I know with insecticides there are some that are approved for pre-harvest use on crops, and the label would have directions about how many days before harvest you're allowed to use it. I would think fungicides would have the same sort of restrictions. Personally I wouldn't eat the thyme anyway if there was any chance that a fungicide got on it, but that's just me!
Some people say that baking soda is effective against mildew and black spot on roses, that would definitely leave the thyme fine to eat so you might try an approach like that first and then consider the fungicide if that doesn't work.
If your problem is mildew / blackspot, here are some suggestions I have received from Tv and some of the fine folks on the rose forum here at DG: Never overhead water, trying to keep the foliage dry. 2. only water in the morning, so they get time to dry. 3. Remove infected leaves and clean any debris from the surrounding area. 4. when you spray use 1 tsp baking soda to a quart of water, or ,you can use 3 tsp baking soda, 1 tsp dish soap to a gallon of water to double as an insectiside. Only spray in the morning about once a week. Sometimes I spray a little more, and It doesn't seem to hurt anything! These are preventative measures so I will have to start early in the season. ...There are hundreds of resorces on this subject on the internet. And the baking soda and soap can be used on edibles too! ... Good luck!