This word is used here to mark a new part of the story.
"while the bridegroom was taking a long time to arrive"
"all ten virgins got sleepy"