Time resolution and efficiency of SPADs and SiPMs for photons and charged particles