Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 29, 2007, 6:13:47 PM (16 years ago)
Author:
landauf
Message:

changed retos usleep hack to a more generic solution:
#ifdef WIN32
#include <windows.h>
#define usleep(x) Sleep((x)/1000)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/network/dummyserver.cc

    r352 r355  
    99#include "ConnectionManager.h"
    1010#include "PacketManager.h"
    11 
    12 // workaround for usleep(int) under windows
    13 #ifdef WIN32
    14 #include "winbase.h"
    15 #endif
    1611
    1712
     
    2823  while(!quit){
    2924    if(server.queueEmpty())
    30 // under windows, use Sleep(milliseconds) instead of usleep(microseconds)
    31 // Warning: Sleep(1) is ten times longer than usleep(100)!
    32 #ifdef WIN32
    33       Sleep(1);
    34 #else
     25// Warning: usleep(100) under windows is ten times longer than with unix!
    3526      usleep(100);
    36 #endif
    3727    else{
    3828      ENetAddress addr;
Note: See TracChangeset for help on using the changeset viewer.