Stop a function after a time

I was trying to create a burst mode for my gun in my game. The way I wanted to implement it is that we have a timer manger which is set to call the fire method from within the gun once every .1 seconds. I have attached an image to showcase what I mean. I want it such that after a specific time the gun stops firing and also during that time we wont be able to fire the gun anymore. I tried using the GetTimerElapsed to check against the time to fire as shown below but adding that line keeps crashing my editor. The BurstTime here is the time for which the gun fires after I have pressed once.Am I using it the wrong way? How do I use it then?The FireDelegate functions just calls the spawn projectile function within the gun actor class.
Thanks in advance.