Hi,
As you know, I am not sleep.h's author. But it is an utility file that helps to make multiplatform programs by redefining the sleep methods so that they do the same. For example, for windows, Sleep(t) sleeps for t milliseconds. For linux, sleeps(t) sleeps for t ms.
With this file, sleep(t) always sleeps for t secs, usleeps(t) sleeps for t usecs...
But in an utility file, it never is a good idea to use in macros such simple words as sleep, wait, push... as it is common to use thoses words for methods names. In that case, it can lead to compilation problems like the one I have been facing (the reason why I changed this file). In utility file, it is better to use macros with name with capital letters and even better to make them start with letters related to the project to make sure they will not conflict with other functions later.
That's why I changed all the sleep macros to OD_SLEEP. And if you want to use sleep, it would be nice to use them as they will be multiplatform.
Bertram {l Wrote}:About the 4x faster problem.
I wondered. Should the OD_USLEEP define divide t per 1000 just like it does a few lines above or not?
Definitely not. OD_USLEEP(t) should always wait for t usecs. If u think it is too much somewhere, you should decrease the argument number.
But again, the changes I've made where only to resolve compilation issues (as explained in the "Typical dev environment under windows" thread). As you can imagine, I have reviewed the code after seeing this thread and AFAIK, this modification doesn't change anything on the sleep times.
The only change I made that can slow down the game is using the CEGUI/OGRE/SFML debug libraries when debugging if they are available. But if you didn't compile them in debug, there should be no change.