n - speed of light in air = n ⋅ speed of light in the material

F
Things to Notice
Minimum

Try dragging the light blue point on the air-material boundary! On the graph, you can see the time it takes light to go from A to B on a specific path. C corresponds to the path that takes the least amount of time, so the path light actually takes. The units of time are $3.3 \cdot 10^{-9} s$, because the distance units are $m$, and so light covers one distance unit in $\frac{1}{c} s$, where $c$ is the speed of light in $m/s$.