How to use "endlessly" in a sentence

Sentences

Marius lay for a long time between life and death in a state of fever, endlessly repeating the name of Cosette.

The curate talked endlessly, and this prevented me from forming a plan of action.