[Release] TimeOut functions

03/28/2015 03:20 pintinho12#16
For a small Conquer Online server, i don't think it will be a issue.
By the way, i am trying to make it simple, so if i need to change something, i will just do it at 1 place.
03/30/2015 00:58 KraHen#17
Quote:
Originally Posted by -impulse- View Post
It won't make any difference. Other than beautifying your code, maybe. Although if you use WaitOne/Sleep in a piece of code, that code shouldn't really appear in lots of places in the source, because you shouldn't Sleep your working threads anywhere.

Probably off-topic:
Depending on the OS, Windows in our case, every thread has a given time span to do its job then when it calls Sleep(...) it sleeps at least the rest of that time span. For Windows it's 20 ms (+/-), so even if you trigger the event you called for WaitOne, it will still wait until the 20 ms are done.

Even more weirder, is that calling something like Thread.Sleep(20) would return one time after 20 ms and one time after like 36 ms.
Anyway, you can't really have a task scheduler that works with millisecond values under like 40. Unless I am wrong and someone knows a way to go have more accuracy, in which case I beg you to show me how.
We recently did a project at our uni where we needed super high precision measurements for this, and our research lead actually brought in separate PCs(? not sure what they were TBH) specifically designed for this. Just a fun fact. :)