Consider the following two scenarios:
While(1) Sleep(10) WEnd and
While(1) Sleep(100000) WEnd
How does Sleep() work for the above two cases? Do they both use the same amount of cpu time?
I think the second scenario will check the time difference just as often as the first scenario, meaning the exact same amount of resources is spent in both scenarios. The only difference is that the second scenario waits longer before going to WEnd?
Is that correct? Or is doing Sleep(100000) better than doing Sleep(10)?
Which is more computationally efficient if I want an infinite loop running in the background?
The above question's answer or:
Thank you in advance.