Time-bandwidth performance of resonant cavities