To my understanding a Thread.Sleep(0) force a context switch on the OS.
I wanted to check what was the maximum amount of time that could pass in an application befor
I suspect that you noticed impact due to your other program was also only CPU bound. Therefore the is also a third program running your not taking into account the OS scheduler.
The non-impacted program is getting stopped by the OS to allow your program to run, and there is context hit for swapping out the process and then loading yours then unloading it again.