How can I re-use clocks with different actions each time?

Hello! I hope you're having a great day/night. I'm here again to ask yet another question about clocks. So, I'm making this app which requires multiple clocks, because it's depends severely on timings and that stuff. But I realized that I can't do that because I'd have to create lots of clocks and that's not good.

So, basically, in a nutshell, I'm asking if it's possible to change the executed action of a timer after that timer activates. Is there a block who can do that? I don't know if I'm being clear. Thanks in advance.

Add an if-else condition in the when Clock.Timer event. You could compare TimerInterval values, or compare a global variable whose value changes when a specific event happens. If you have a more specific task, it would help if you could describe the task.

1 Like

Basically I have a clock with a TimerInterval of 5000. I want to execute a task at 5 seconds and then another different task at 10 seconds, and another one at 15 secs, without having to create three different clocks, you know, to reduce the application size and all that optimization stuff...

1 Like

Thank you! This makes sense!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.