Measuring duration of voltage peak

Well since its sound waves it only going to halt process for a few millis or even micros.
I would recommend adding a second timing loop within the do nothing loop to provide a break if it gets stuck waiting although since my code triggers on rising amplitude it has to fall again even if sound stops.