Avoiding race condition in flow context?

I was looking for similar solution, and found out about this:

You can simply use Delay nodes too!
The trick is, you can give to msg.reset a value like "True" and it will automatically cancel all running delays.

[{"id":"64ca47f5.7b75e","type":"inject","z":"37c9a989.495456","name":"Do it now","topic":"","payload":"7","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":100,"wires":[["a49806c2.c5f05","ece3fc93.0f7248"]]},{"id":"a49806c2.c5f05","type":"change","z":"37c9a989.495456","name":"resettt","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":430,"y":180,"wires":[["6ec487d5.fc2e"]]},{"id":"ece3fc93.0f7248","type":"delay","z":"37c9a989.495456","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":330,"y":100,"wires":[["29498c22.ff4a6c"]]},{"id":"718518ad.73964","type":"inject","z":"37c9a989.495456","name":"stop","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":180,"wires":[["a49806c2.c5f05"]]},{"id":"6ec487d5.fc2e","type":"delay","z":"37c9a989.495456","name":"","pauseType":"delayv","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":700,"y":100,"wires":[["f71e47e6.373058"]]},{"id":"29498c22.ff4a6c","type":"change","z":"37c9a989.495456","name":"sec_change","rules":[{"t":"set","p":"delay","pt":"msg","to":"ido","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"Changed delay to 7000ms","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":510,"y":100,"wires":[["6ec487d5.fc2e"]]},{"id":"f71e47e6.373058","type":"debug","z":"37c9a989.495456","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"delay","targetType":"msg","x":880,"y":100,"wires":[]}]

You can also change the time to wait. But it's Important:
Wait time must be given as millisec! 5000 = 5sec