Mixe for Privacy and Anonymity in the Internet
Functions
CADatabase.cpp File Reference
#include "StdAfx.h"
#include "CADatabase.hpp"
#include "CAUtil.hpp"
#include "CAMsg.hpp"
Include dependency graph for CADatabase.cpp:

Go to the source code of this file.

Functions

THREAD_RETURN db_loopMaintenance (void *param)
 

Function Documentation

◆ db_loopMaintenance()

THREAD_RETURN db_loopMaintenance ( void *  param)

Definition at line 241 of file CADatabase.cpp.

242  {
243  INIT_STACK;
244  BEGIN_STACK("CADatabase::db_loopMaintenance");
245 
246  CADatabase* pDatabase=(CADatabase*)param;
247  while(pDatabase->m_bRun)
248  {
249  sSleep(10);
250  UINT32 currentTime=(UINT32)time(NULL);
251  if (pDatabase->m_lastSwitch+SECONDS_PER_INTERVALL<=currentTime)
252  {
253  pDatabase->nextClock();
254  }
255  }
256 
257  FINISH_STACK("CADatabase::db_loopMaintenance");
258 
260  }
#define SECONDS_PER_INTERVALL
Definition: CADatabase.hpp:47
#define INIT_STACK
Definition: CAThread.hpp:48
#define BEGIN_STACK(methodName)
Definition: CAThread.hpp:49
#define FINISH_STACK(methodName)
Definition: CAThread.hpp:50
SINT32 sSleep(UINT32 sec)
Sleeps sec Seconds.
Definition: CAUtil.cpp:425
#define THREAD_RETURN_SUCCESS
Definition: StdAfx.h:542
unsigned int UINT32
Definition: basetypedefs.h:131
UINT64 m_lastSwitch
Definition: CADatabase.hpp:103
SINT32 nextClock()
Definition: CADatabase.cpp:262
volatile bool m_bRun
Definition: CADatabase.hpp:107