They can waste a hundred years if they like but the match isn't over until the ball goes out of play (it might be a bit more complicated than that but that's the general gist).
Once the hooter goes the challenge therefore becomes one where the winning team is trying to get it out of play before the losing team strikes back.
Splod wrote:
whenever there is a break in play for injuries or substitutions the ref calls for the clock to be stopped and restarts it when the stoppage is over. Hence the clock is there for all to see.
Yes sorry, I forget to mention that detail; I take it so much for granted.