Last change
on this file since 1494 was
1494,
checked in by rgrieder, 16 years ago
|
- set the svn:eol-style property to all files so, that where ever you check out, you'll get the right line endings
(had to change every file with mixed endings to windows in order to set the property)
|
-
Property svn:eol-style set to
native
|
File size:
1.5 KB
|
Line | |
---|
1 | /* |
---|
2 | * ORXONOX - the hottest 3D action shooter ever to exist |
---|
3 | * > www.orxonox.net < * |
---|
4 | * |
---|
5 | * License notice: |
---|
6 | * |
---|
7 | * This program is free software; you can redistribute it and/or |
---|
8 | * modify it under the terms of the GNU General Public License |
---|
9 | * as published by the Free Software Foundation; either version 2 |
---|
10 | * of the License, or (at your option) any later version. |
---|
11 | * |
---|
12 | * This program is distributed in the hope that it will be useful, |
---|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
15 | * GNU General Public License for more details. |
---|
16 | * |
---|
17 | * You should have received a copy of the GNU General Public License |
---|
18 | * along with this program; if not, write to the Free Software |
---|
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
---|
20 | * |
---|
21 | * Author: |
---|
22 | * Reto Grieder |
---|
23 | * Co-authors: |
---|
24 | * ... |
---|
25 | * |
---|
26 | */ |
---|
27 | /** |
---|
28 | @file Sleep.h |
---|
29 | @brief Macros for using sleep() and usleep() under windows |
---|
30 | */ |
---|
31 | |
---|
32 | #include "UtilPrereqs.h" |
---|
33 | |
---|
34 | #if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32# ifndef WIN32_LEAN_AND_MEAN# define WIN32_LEAN_AND_MEAN# endif# include <windows.h> |
---|
35 | inline void usleep(DWORD dwMicroseconds) |
---|
36 | { |
---|
37 | Sleep(dwMicroseconds / 1000); |
---|
38 | } |
---|
39 | inline void msleep(DWORD dwMilliseconds) |
---|
40 | { |
---|
41 | Sleep(dwMilliseconds); |
---|
42 | } |
---|
43 | inline void sleep(DWORD dwSeconds) |
---|
44 | { |
---|
45 | Sleep(dwSeconds * 1000); |
---|
46 | } |
---|
47 | #else |
---|
48 | # include <unistd.h> |
---|
49 | inline void msleep(unsigned long msec) |
---|
50 | { |
---|
51 | usleep(msec * 1000); |
---|
52 | } |
---|
53 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.