void CLoginModule::update()
{
uint32 tmnw = NLMISC::CTime::getSecondsSince1970();
//判断是否需要更新
if (tmnw - mLastUpdateTm < 2)
{
return;
}
//更新时间戳
mLastUpdateTm = tmnw;
std::map<uint32, CPendingUser>::iterator it = PendingUsers.begin();
for (;it != PendingUsers.end(); )
{
if (tmnw - it->second.Time >= TimeoutCookie)
{
PendingUsers.erase(it++);
}
else
{
++it;
}
}
}