I have several instances in my application. Each of these instances have a Timer object which will trigger the object's own method after an amount of time.
As this would be a simple simulation app, I intend to allow it to have a pause/continue simulation feature as well as an "step up/down speed" feature to the timers.
However, if all my instances have their own individual Timer objects, they will all run independently on their own and it is difficult to ask all these objects to pause and then continue. Even if I were to loop through a list of array to call every instances to pause/continue its timer, this definitely isn't a very efficient way to do things. This same problem applies for stepping up and down the overall speed of the timers.
It seems like I should have only one single timer in the simulation world that will control all of the instances but again, this would make things very complex as well.
What are some of the implementation methods to achieve such requirements? I am using Java for my application.