mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 14:16:16 -04:00
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:
parent
c17de671bb
commit
880efee332
12 changed files with 57 additions and 129 deletions
|
@ -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()";
|
||||
|
|
|
@ -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 ;
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <unistd.h> /* for (u)sleep() */
|
||||
#include <iostream>
|
||||
#include <time.h>
|
||||
#include "util/rsdebug.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue