The delay-time distribution of Type Ia supernovae: a comparison between theory and observation