Changeset 1300 for code/branches/input/src/util
- Timestamp:
- May 15, 2008, 10:09:23 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/input/src/util/Sleep.h
r1062 r1300 35 35 36 36 #if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32 37 # ifndef WIN32_LEAN_AND_MEAN 38 # define WIN32_LEAN_AND_MEAN 39 # endif 37 40 # include <windows.h> 38 # define usleep(x) Sleep((x) / 1000) 39 # define msleep(x) Sleep(x) 40 # define sleep(x) Sleep((x) * 1000) 41 inline void usleep(DWORD dwMicroseconds) 42 { 43 Sleep(dwMicroseconds / 1000); 44 } 45 inline void msleep(DWORD dwMilliseconds) 46 { 47 Sleep(dwMilliseconds); 48 } 49 inline void sleep(DWORD dwSeconds) 50 { 51 Sleep(dwSeconds * 1000); 52 } 41 53 #else 42 54 # include <unistd.h> 43 # define msleep(x) uleep((x) * 1000) 55 inline void msleep(unsigned long msec) 56 { 57 usleep(msec * 1000); 58 } 44 59 #endif
Note: See TracChangeset
for help on using the changeset viewer.