vectorize ms_to_ticks