Design Pattern: Looping Timers

See my reply on your original post for how I would do what you originally described as wanting to do (i.e. do something, wait some amount of time and do something else, then wait a different amount of time and do something else). For that use case, I think just creating separate Timers is the better way to go.

To answer your specific question here, all things are possible but does it make sense? For your use case on the other thread, separate non-looping timers are probably a better choice. If you have a different use case in mind, I’d need more details about what you are trying to accomplish (don’t confuse what you are trying to accomplish with how you are trying to accomplish it, sometimes referred to as the XY Problem).

1 Like