Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 28, 2008, 8:45:31 PM (16 years ago)
Author:
rgrieder
Message:
  • clean up in OrxonoxPlatform.h
  • that's it
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gui/src/util/Sleep.h

    r1638 r1652  
    2828
    2929/**
    30  @file  Sleep.h
    31  @brief Functions for using sleep() and usleep() under windows
     30 @file
     31 @brief
     32    Functions for using sleep() and usleep() under windows.
    3233 */
    3334
    34 #include "UtilPrereqs.h"
     35#ifndef _Sleep_H__
     36#define _Sleep_H__
     37
     38#include "OrxonoxPlatform.h"
    3539
    3640#if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32
    37 #  ifndef WIN32_LEAN_AND_MEAN
    38 #    define WIN32_LEAN_AND_MEAN
    39 #  endif
    40 #  include <windows.h>
     41
     42#ifndef WIN32_LEAN_AND_MEAN
     43# define WIN32_LEAN_AND_MEAN
     44#endif
     45#include <windows.h>
     46
    4147inline void usleep(DWORD dwMicroseconds)
    4248{
    4349  Sleep(dwMicroseconds / 1000);
    4450}
     51
    4552inline void msleep(DWORD dwMilliseconds)
    4653{
    4754  Sleep(dwMilliseconds);
    4855}
     56
    4957inline void sleep(DWORD dwSeconds)
    5058{
    5159  Sleep(dwSeconds * 1000);
    5260}
    53 #else
    54 #  include <unistd.h>
     61
     62#else /* Linux/Apple */
     63
     64#include <unistd.h>
     65
    5566inline void msleep(unsigned long msec)
    5667{
    5768  usleep(msec * 1000);
    5869}
     70
    5971#endif
     72
     73#endif /* _Sleep_H__ */
Note: See TracChangeset for help on using the changeset viewer.