How to make a block of code run less times.

Set timer by event won’t help since it triggers the function in a delay. I want it to respond immediately and then delay.
The goal is simply not to have the function run so many times.