Centipedes can survive underwater for up to 30 minutes because they can breathe through specialized openings called spiracles.