|
Mixe for Privacy and Anonymity in the Internet
|
Go to the source code of this file.
Functions | |
| THREAD_RETURN | replaydb_loopMaintenance (void *param) |
| THREAD_RETURN replaydb_loopMaintenance | ( | void * | param | ) |
Definition at line 175 of file CAReplayDatabase.cpp.
References BEGIN_STACK, FINISH_STACK, CAReplayDatabase::getCurrentReplayTimestamp(), INIT_STACK, t_replay_timestamp::interval, CAReplayDatabase::m_bRun, CAReplayDatabase::m_currentClock, CAReplayDatabase::m_refTime, CAReplayDatabase::nextClock(), SECONDS_PER_INTERVALL, sSleep(), and THREAD_RETURN_SUCCESS.
{
INIT_STACK;
BEGIN_STACK("CADatabase::db_loopMaintenance");
CAReplayDatabase* pDatabase=(CAReplayDatabase*)param;
tReplayTimestamp rt;
pDatabase->getCurrentReplayTimestamp(rt);
pDatabase->m_currentClock=rt.interval;
while(pDatabase->m_bRun)
{
sSleep(10);
SINT32 secondsTilNextClock=((pDatabase->m_currentClock+1)*SECONDS_PER_INTERVALL)+pDatabase->m_refTime-time(NULL);
if(secondsTilNextClock<=0&&pDatabase->m_bRun)
pDatabase->nextClock();
}
FINISH_STACK("CADatabase::db_loopMaintenance");
THREAD_RETURN_SUCCESS;
}
1.7.6.1