If I knew how to express myself clearly I'd google this stuff, but I don't. So here it goes: I can call Sleep for, let's say, 10 secs, and then execute some code. The overall time of such operation would be 10s + whatever it took to execute the code. However, what I want is for the code to be executed inside the 10 seconds period and wait for whatever time is left, so I'd have a stable execution period. How do I do that?