mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Fix Windows Compilation
This commit is contained in:
parent
873131f487
commit
28119b5094
@ -1,4 +1,5 @@
|
||||
#include <sstream>
|
||||
#include <unistd.h> /* for usleep() */
|
||||
|
||||
#include "p3i2pbob.h"
|
||||
|
||||
@ -38,11 +39,7 @@ static struct RsLog::logInfo i2pBobLogInfo = {RsLog::Debug_All, "p3I2pBob"};
|
||||
static const time_t selfCheckPeroid = 30;
|
||||
|
||||
void doSleep(useconds_t timeToSleepMS) {
|
||||
#ifndef WINDOWS_SYS
|
||||
usleep((useconds_t) (timeToSleepMS * 1000));
|
||||
#else
|
||||
Sleep((int) (timeToSleepMS));
|
||||
#endif
|
||||
}
|
||||
|
||||
p3I2pBob::p3I2pBob(p3PeerMgr *peerMgr)
|
||||
|
@ -4,8 +4,10 @@
|
||||
#include <map>
|
||||
#include <queue>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <time.h>
|
||||
#ifndef WINDOWS_SYS
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#include "services/autoproxy/rsautoproxymonitor.h"
|
||||
#include "util/rsthreads.h"
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include "rsautoproxymonitor.h"
|
||||
|
||||
#include <unistd.h> /* for usleep() */
|
||||
|
||||
rsAutoProxyMonitor *rsAutoProxyMonitor::mInstance = NULL;
|
||||
|
||||
rsAutoProxyMonitor::rsAutoProxyMonitor()
|
||||
@ -91,11 +93,7 @@ void rsAutoProxyMonitor::stopAllRSShutdown()
|
||||
// wait for shutdown of all services
|
||||
uint32_t t = 0, timeout = 15;
|
||||
do {
|
||||
#ifndef WINDOWS_SYS
|
||||
usleep(1000 * 1000);
|
||||
#else
|
||||
Sleep(1000);
|
||||
#endif
|
||||
RS_STACK_MUTEX(mLock);
|
||||
std::cout << "(II) waiting for auto proxy service(s) to shut down " << t << "/" << timeout << " (remaining: " << mProxies.size() << ")" << std::endl;
|
||||
if (mProxies.empty())
|
||||
|
Loading…
Reference in New Issue
Block a user