Conditional curl on a swtich?

I would like to ask for some help, I don’t know if it’s possible. Create a button, where by means of curl I turn on or off a device, my problem is that the team has a time of 10s to recognize another curl, so if in less than 10s I turn on and off the button in HA it appears as if It was off when it is actually on since the second action (turn off) is not received by the team because it was before 10s.
What I would like is that if it has not been 10s since the last press do nothing.