Rugby has this all figured out and has done for years. Certain stuff stops the clock. Once the 80 minutes are up and the ball goes dead, that's it. It's super simple.