I believe with weight lifting, its good to always have a plan. I'm not sure how intense your class is, but is it a true weights class or is it a cardio weights class? (using lighter weights to increase heart rate)
I do weights at home and I watch tv but I don't rest 'too long'. I also have a plan on what type of weights I'm doing when. Do I want to work my upper body? My lower body? A warmup is a good idea with weights but you can also do weights as part of your warmup, basically a set of light weights.
You can't out-exercise poor eating habits.