I use several timers as well as a serial control and a TCP socket in a service app that is designed to run continuously and may connect to different IP addresses or serial ports. I know that if this were a desktop app, I could place them on the desktop as controls and I would only have one instance of each one. Both the TCPSocket and the Serial control are subclassed and I create an instance of one or the other depending on what is specified in the database for the device to communicate with.
In creating a watchdog timer to clean up things if the system were to hang for some unknown reason outside my control, it occurred to me that using a single instance might be a better approach. Some of my timers are instantiated when execution starts and some get a new instance whenever one is needed. Is one way better than the other? If I use a new instance each time, do I need to set the old one to NIL first?