Add endless-loop utility function.