Good day all!
I am trying to make my app to call a function n times per second. I use a System.Timers.Timer for that purpose (I made it to expire n times per second by setting its interval to 1000/n ms). The maximum calls per second I get is 65. I've tryed to use System.Threading.ThreadPool.QueueUserWorkItem, I've tryed starting new Threads each time the timer expires. Well it starts with 100 calls per second for the first few seconds and then slows down to 65.
I even tryed not using timer and made it with Thread.sleep like it was advised in one of the posts here: it didn't help at all.
BTW I once made similar things in Java (SchedulerExecutorService) and I had up to 1000 calls per second with no problem.
What else could help me to solve the problem?
Update:
Thanks to all, I've found the solution here:
The Multimedia Timer for the .NET Framework
They use winmm.dll functions for Timer class realization and it works perfectly for me.