Synchronized delivery of Er:YAG-laser-pulse energy during oscillations of vapor bubbles