feat(Core/Time): Implement saparated manager for game time (#8630)

This commit is contained in:
Kargatum
2022-01-24 17:55:00 +07:00
committed by GitHub
parent 12da792a90
commit 8b7df23f06
129 changed files with 1147 additions and 817 deletions

View File

@@ -16,7 +16,6 @@
*/
#include "MapMgr.h"
#include "AvgDiffTracker.h"
#include "Chat.h"
#include "DatabaseEnv.h"
#include "GridDefines.h"
@@ -252,13 +251,12 @@ void MapMgr::Update(uint32 diff)
//if (mapUpdateStep == 0)
{
if (m_updater.activated())
{
m_updater.schedule_lfg_update(diff);
}
else
{
uint32 startTime = getMSTime();
sLFGMgr->Update(diff, 1);
uint32 totalTime = getMSTimeDiff(startTime, getMSTime());
lfgDiffTracker.Update(10000 + totalTime); // +10k to mark it was NOT multithreaded
}
}