The time structure of Cherenkov images generated by TeV γ-rays and by cosmic rays