This is a totally normal project! Do what the cat says. Don't click the red button!
I used a trick to do this. A bug in Scratch that they don't need to fix. The timer continuously resets while the project is running, but when the project stops, it starts to count up. And the bug utilized allows that to be detected, and runs a script.