You might like to try @rlkoshak’s Group and Filter design pattern.
He wrote an example of using timers and this pattern in this post, which is more complex than your current problem, but could make any future changes easier.
You might like to try @rlkoshak’s Group and Filter design pattern.
He wrote an example of using timers and this pattern in this post, which is more complex than your current problem, but could make any future changes easier.