I am using the code below
Thread.Sleep(5);
at the end of the while loop. To try to get a 5 ms delay between iterations.
Sometimes he sleeps for 16 ms. I understand and accept this, because it depends on when the CPU wraps around the thread service. However, as soon as he woke up the next iteration, he seemed to wake up right after sleep (I register with timestamps). Is there a problem with using such a short wait interval that it is treated as zero?
multithreading c #
Paul
source share