Hi,
first look what I mean with Sleep and MySleep.
Sleep:
System.Threading.Thread.Sleep(5000);
MySleep:
DateTime DT = DateTime.Now;
while (((TimeSpan)(DateTime.Now - DT)).TotalMilliseconds < 5000) ;
If you use Sleep, you will see no CPU-Usage-Maximum in the TaskManager.
But if you use MySleep, the CPU will reach a usage max. I understand why MySleep use the CPU, but why does Sleep don't?
How does Sleep sleep?