There’s no upper limit, so there’d have to be some set of rules like no sleep(n).
Also given the halting problem, you could write an algorithm that would be impossible to determine if it loops forever.
Also given the halting problem, you could write an algorithm that would be impossible to determine if it loops forever.