I think that it depends more on what you were doing before going to the gym. If you have been sitting in an office all day or just woke up, then I would look at about 10-12 minutes of walking on the treadmill. If you have just finished working at a physical job then I would do a couple sets of warmups on the exercise that you're planning to do.