Timed Repeat control


I’m trying to set up a simple timed key repeat for a game (trigger “1” every few seconds for example). I have no issue getting the key to repeat once pressed but I can not find any documentation on how to then stop the timed repeat when I want it to.
How do I stop a timed repeat after it is triggered?