Depending on your definition of warmed up, it takes me 15-30 minutes. As in, if I'm not competing and I hop on my bike and go for a ride, I take about 15 minutes to hit my stride. Unless I'm really pissed off or tired or something like that. If I'm racing, I think I'm better if I take a bit longer, about a half hour seems good.
I recover well, so I don't know that I've ever blown myself up badly enough to screw up the rest of the ride. But if I get right on and hammer, I'll feel it, and I'll probably have to soft-pedal a bit sooner or later to recover.
I really only have one riding spot that just doesn't let me warm up before throwing something big and technical at me. So most of the time, as long as I don't go out hammering, I get enough flat to rolling terrain to be adequately warmed up before I have to push myself.
Outside of race days, I don't do anything special to warm up. I just get on my bike and ride, at my non-masochistic pace.