sleep pauses the tread for some time, i think there is no bether way

(i heard that waitforsingleobject and waitformultipleobjects uses sleep internaly, but im not sure, it can be another option)