[Dedicated] Optimize data transmission

This commit is contained in:
momo5502 2017-06-04 16:53:50 +02:00
parent f0db0f2114
commit 63c59b70c2

View File

@ -382,19 +382,17 @@ namespace Components
// Transmit custom data // Transmit custom data
Scheduler::OnFrame([]() Scheduler::OnFrame([]()
{ {
static std::uint64_t LastUpdate = 0; static Utils::Time::Interval interval;
if (interval.elapsed(10s))
if ((GetTickCount64() - LastUpdate) > 10000)
{ {
interval.update();
CardTitles::SendCustomTitlesToClients(); CardTitles::SendCustomTitlesToClients();
Clantags::SendClantagsToClients(); Clantags::SendClantagsToClients();
LastUpdate = GetTickCount64();
} }
}); });
#ifdef USE_LEGACY_SERVER_LIST #ifdef USE_LEGACY_SERVER_LIST
// Heartbeats // Heartbeats
Scheduler::OnFrame([] () Scheduler::OnFrame([] ()
{ {