Desired 1ms timer that yields an undesired 10ms resolution

G

Guest

I am developing a .net application using C# that requires a 1ms timer. I
have tried creating said timer by creating a timer object
(System.Timers.Timer) that is seeded with a 1ms interval. I have also tried
creating a thread with a 1ms sleep time.

The timer object that was created will only yield a resolution as low as
10ms no matter how low the interval is set.

Most of the time the thread timer yields the same 10ms resolution as the
timer object. However, sometime the thread timer will yield the desired 1ms
resolution. I have not been able to extrapolate a pattern for this behavior.
I have also set the priority of the thread to the “Highest†level.

Can anyone shed some light on these phenomena?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top