How to determine the critical delay for a closed-loop system?
A delay can be included in the conversion chain as shown below for a buck converter. Here the delay is incurred to the comparator propagation time which is significant at a high switching frequency.



The thing is that you end up with a transfer function now including an exponential term. You can rewrite the exponential term using a Padé approximant fitting the delay versus frequency with the precision you want. A first-order version is given by \$e^{-t}\approx \frac{1-\frac{s\tau}{2}}{1+\frac{s\tau}{2}}\$ in which you recognize a RHP zero and a LHP pole tuned at the same frequency depending on \$\tau\$ your delay. We can show that the new stability criterion is no longer the phase margin but the delay margin. The maximum acceptable delay in the loop is defined as \$\tau_{max}=\frac{\phi_m}{\omega_c}\$ in which \$\phi_m\$ is the phase margin measured at \$\omega_c\$ the crossover angular frequency. Please look at this document for more details on delay and modulus margins. Just as a side note, a transfer function including RHP zeros or RHP poles or delays is a non-minimum-phase function and the Bode criteria may fail to predict stability. Nyquist is the way to go in this case.