How to stop a timer by function name

I have a function by the name of ‘Decrement’ which adds 1 to a value every second. Upon death I would like to know how to pause the timer as it’s on a loop and I can’t find any solutions.

You can save the timer in a Timer Handler type variable and pause it when you want

You can have an if statement in that function to check if you are dead or not. If false, you run the function normally. If true, do nothing. When you die, you make this boolean true so function does nothing.