CPU usage spiking

  • Thread starter Thread starter mmitchell
  • Start date Start date
M

mmitchell

I have a statement as: Thread.CurrentThread.Sleep(1000 * 10), which
spikes CPU usage from 17% to 65%. I thought this was supposed to bring
the CPU usage down.

How else would I pause a thread without raising the CPU usage up?
 
I found it was a do loop causing the spike. I added:
Thread.CurrentThread.Sleep(100) inside the Do Loop and the CPU usage
dropped to 0-2%.
 
I have a statement as: Thread.CurrentThread.Sleep(1000 * 10), which
spikes CPU usage from 17% to 65%. I thought this was supposed to bring
the CPU usage down.

Mhm... Try 'System.Threading.Thread.Sleep(100000)'.
 
Back
Top