-
make a new Interface - TimerEventHandler
add to it several methods that implementors must implement - I’d suggest on per Timer event -
make a new subclass of timer - DelegatingTimer
-
add a protected property to this new subclass - m_Handler as TimerEventHandler
-
in this new timer add a Constructor that takes an instance of TimerEventHandler
Constructor( eventHandler as TimerEventHandler) m_Handler = eventHandler
4) in the new subclass add EVERY event it has
in each you basically just forward the event to the delegate - m_eventHandler
Action()
m_Handler.Action()
etc
now you can create anything to implement that interface
and create timers in code that call the implementor