How much time does it take for a switch to go from on to off?
This is a very good question.


  When a switch changes the circuit from closed to open, it chages the current very quickly.


Not exactly. When the switch is opened, the voltage across the switch increases. This voltage decreases the inductor current, according to di/dt = V/L.

Depending on the switch, and how it reacts to increasing voltage across it, to some extent the energy stored in the inductor determines how the switch opens.

Any real switch will have stray capacitance across the contacts. In some switches (car ignition breaker points) the capacitance will be augmented by a physical capacitor placed across the contacts. FETs and transistors will have inter-electrode capacitances in the 10s to 1000s of pFs, depending on device size.

The inductor current that continues to flow charges this capacitance. The opening switch is therefore subject to a rapidly rising, though not instantaneous, voltage.

If the energy originally in the inductor can be stored in the switch capacitance at a voltage low enough that the switch doesn't break over, then the switch won't break over. This is what the big capacitor does in the car ignition breaker system. The gap between the contacts opens fast enough and the voltage rises slowly enough that the contacts keep 'ahead' of the rising voltage.

If the switch voltage rises above some breakdown voltage, then it will break down. With physical switches, this results in an arc between the terminals. This arc can melt and move metal around, so it's often quite destructive to mechanical contacts. It can be mitigated by using high melting point materials, very heavy contacts, or using (as in high voltage switchgear) air-blasts to cool and lengthen, and so extinguish the arc. While the switch is arcing, you could consider it 'closed', or at least not 'open', so the length of time the inductor energy keeps it arcing effectively controls how fast it opens.

MOSFETs often have a controlled non-destructive avalanche behaviour, which is specified to be able to repetitively absorb a certain amount of energy. It's quite normal to design a switching circuit such that the stored energy in the circuit inductance is dissipated in the switching FET.

When a semiconductor switch can't handle the stored inductive energy, it's common to use a 'snubber' circuit across them, consisting of a resistor and capacitor in series. This makes the switch less efficient in the system, so they are made just large enough to protect the switch, and no larger.