removed ifdef for the different sleep methods. Now only usleep is used, on all systems. Patch from Phenom

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7629 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2014-10-24 21:31:58 +00:00
parent c17de671bb
commit 880efee332
12 changed files with 57 additions and 129 deletions

View file

@ -217,11 +217,8 @@ void ftController::run()
while(isRunning())
{
#ifdef WIN32
Sleep(1000);
#else
sleep(1);
#endif
//Waiting 1 sec before start
usleep(1*1000*1000); // 1 sec
#ifdef CONTROL_DEBUG
std::cerr << "ftController::run()";

View file

@ -39,9 +39,9 @@
#include <time.h>
/* For Thread Behaviour */
const uint32_t DMULTIPLEX_MIN = 10; /* 1ms sleep */
const uint32_t DMULTIPLEX_MIN = 10; /* 10 msec sleep */
const uint32_t DMULTIPLEX_MAX = 1000; /* 1 sec sleep */
const double DMULTIPLEX_RELAX = 0.5; /* ??? */
const double DMULTIPLEX_RELAX = 0.5; /* relax factor to calculate sleep time if not working in /libretroshare/src/util/rsthreads.cc */
static const uint32_t MAX_CHECKING_CHUNK_WAIT_DELAY = 120 ; //! TTL for an inactive chunk
const uint32_t MAX_SIMULTANEOUS_CRC_REQUESTS = 20 ;

View file

@ -23,7 +23,6 @@
*
*/
#include <unistd.h> /* for (u)sleep() */
#include <iostream>
#include <time.h>
#include "util/rsdebug.h"