This may not be an entirely not a .NET related question. I am writing a .NET application to control some gadgets. I send commands to the gadget periodically (say every 500 milliseconds). As soon as I send the command I start a timer. (.NET stopwatch class)
If the gadget not respond within say, 10 milliseconds, I send the command again. If it does respond, I continue to monitor the gadget status by sending more commands and processing the responses.
I have 2 or 3 stopwatch timers running in parallel to do other things for this one gadget.
Now, I want to monitor and control potentially thousands of these gadgets (could be as high as 5000). If I create one object for a gadget, I will looking at 10000 to 15000 stopwatch objects running in parallel. I am not sure how the stopwatches work but I assume they rely on a hardware timer or some such thing to keep track of time.
My question is, can windows handle such a large number of stopwatches simultaneously?