The while form fills in what occupies the wait, and in these lines that is usually a feeling or a small activity: waiting with your heart thumping, waiting with anticipation, waiting while holding eye contact, waiting while chanting a song title, waiting on tenterhooks without sleep. It is the ordinary way to describe how you passed the time, not a fixed idiom.