Thread.Sleep(1) as stated will not hog the CPU.
Here is what happens when a thread sleeps (more or less):
- Thread.Sleep is translated into a system call, which in turn triggers a trap (an interruption that allows the operating system to take control)
- The operating system detects the call to sleep and marks your thread as blocked.
- Internally the OS keeps a list of threads that need to be waken up and when it should happen.
- Since the thread is no longer using the CPU the OS...
- If the parent process has not used up all of its time slice the OS will schedule another thread of the process for execution.
- Otherwise another process (or the idle process) will start executing.
- When the time is due, your thread will be scheduled again for execution, that doesn't mean it will start executing automatically.
On a final note, I don't exactly know what you are doing but it would seem you're trying to take the role of the scheduler, that is, sleeping to provide the CPU with time to do other things...
In a few cases (very few indeed) it might be all right, but mostly you should let the scheduler do its work, it probably knows more than you do, and can make the work better than you can do it.