Laser-pulse shaping using inducible absorption with controlled Q-switch time behavior