Others need four hours. We're all different. There's conflicting views about what's necessary and much depends, once again, on what suits each individual. For most races, other than marathons, I prefer to jog easily for around 15 minutes - or perhaps longer if I've undertaken a lengthy journey cramped up in a car, bus or train. After that a few strides, no more than 100m each, helps stretch out the legs.
Some people do a little easy stretching.
The trick is to get the muscles warmed up without overheating the body too much. Don't hang around getting cold. And if its damp or raining try to keep dry. A bin liner which can be thrown away seconds before the race starts is a good idea. In very warm conditions you may need less of a warm-up.