I found this sentence today -
Billy sang another hymn. He shoveled and paced to the time of the music.
Billy was confined in darkness in the mine. He was shoveling musk in a coal mine, at a section where no one was around. While doing his work, suddenly his safety lamp went out. He was in complete darkness. He didn't know the way to go back, and most scary he couldn't see due to such darkness. So he started to feel scared. And in order to cheer him up, he started to think Jesus was around to take care of him. And he started to sing, the hymn.
I can't understand the meaning of the bold part of the sentence. Pleas help me.