I think the expression "... ten years' time" suggests a more correct meaning. It's the time that punishes, not the ten years. The ten years are simply a qualifying length of that time.
Proof? Try changing it from 10 years to 1 year.
Aha! Can't do it without an apostrophe, can you!
(and that would be ... a year's time, not a years' time, eh!)