It's not how long you've had it as much as how long you've worn it. The longer you wear it the more the padding starts to pack down. I just replaced mine after only 4 years but it was beat after 98,000 miles of riding.
Time does matter. How much you used it matters too, but just sitting on the shelf it will eventually need to be replaced. The hard foam liner (styrofoam like stuff between the outer shell and the pads) which provides the bulk of your protection, will eventually break down and loose it's impact absorbing capabilities. Manufacturers say anywhere from 3 to 5 years. I'd guess that is very, very conservative, but ten years is probably past time to replace it.