Relaxation time for quark spin and thermal vorticity alignment in heavy-ion collisions