Transient evolution of the field power spectrum during the switch-on of a detuned laser