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

@ -182,32 +182,26 @@ void AuthGPG::run()
{
int count = 0;
while (isRunning())
{
#ifdef WIN32
Sleep(100);
#else
usleep(100000);
#endif
while (isRunning()) {
usleep(100 * 1000); //100 msec
/* every 100 milliseconds */
/// every 100 milliseconds
processServices();
/* every ten seconds */
if (++count >= 100 || _force_sync_database)
{
RsStackMutex stack(gpgMtxService); /******* LOCKED ******/
// The call does multiple things at once:
// - checks whether the keyring has changed in memory
// - checks whether the keyring has changed on disk.
// - merges/updates according to status.
//
/// every ten seconds
if (++count >= 100 || _force_sync_database) {
RsStackMutex stack(gpgMtxService); ///******* LOCKED ******
/// The call does multiple things at once:
/// - checks whether the keyring has changed in memory
/// - checks whether the keyring has changed on disk.
/// - merges/updates according to status.
///
PGPHandler::syncDatabase() ;
count = 0;
_force_sync_database = false ;
}
}
}//if (++count >= 100 || _force_sync_database)
}//while (isRunning())
}
void AuthGPG::processServices()