Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 11, 2009, 4:06:31 PM (15 years ago)
Author:
rgrieder
Message:

Removed all enet and boost includes from header files in the network library.

  • Reduces dependencies
  • Minimises problems with windows.h
  • Speeds up the compiling process a little bit (probably negligible)
  • Also removes ugly WIN32_LEAN_AND_MEAN declarations before every enet.h include in the network library.

Removed windows.h header from util/Sleep.h by adding Sleep.cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/util/Sleep.h

    r2710 r2773  
    3030 @file
    3131 @brief
    32     Functions for using sleep() and usleep() under windows.
     32    Functions for using sleep() and usleep() on windows.
    3333 */
    3434
     
    3838#include "UtilPrereqs.h"
    3939
    40 #ifdef ORXONOX_PLATFORM_WINDOWS
    41 #include <winbase.h>
    42 
    4340namespace orxonox
    4441{
    45     inline void usleep(DWORD dwMicroseconds)
    46     {
    47         Sleep(dwMicroseconds / 1000);
    48     }
    49 
    50     inline void msleep(DWORD dwMilliseconds)
    51     {
    52         Sleep(dwMilliseconds);
    53     }
    54 
    55     inline void sleep(DWORD dwSeconds)
    56     {
    57         Sleep(dwSeconds * 1000);
    58     }
     42    _UtilExport void usleep(unsigned long microseconds);
     43    _UtilExport void msleep(unsigned long milliseconds);
     44    _UtilExport void sleep (unsigned long seconds);
    5945}
    6046
    61 #else /* Linux/Apple */
    62 
    63 #include <unistd.h>
    64 
    65 namespace orxonox
    66 {
    67     inline void usleep(unsigned long usec)
    68     {
    69         ::usleep(usec);
    70     }
    71     inline void msleep(unsigned long msec)
    72     {
    73         ::usleep(msec * 1000);
    74     }
    75     inline void sleep(unsigned long sec)
    76     {
    77         ::usleep(sec * 1000000);
    78     }
    79 }
    80 
    81 #endif
    82 
    8347#endif /* _Sleep_H__ */
Note: See TracChangeset for help on using the changeset viewer.