Time delay between the nucleosynthesis of cosmic rays and their acceleration to relativistic energies