mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-28 21:02:14 +01:00
Dep: Replace basic_deadline_timer with std::chrono based basic_waitable_timer
(cherry picked from commit c81183a660)
This commit is contained in:
@@ -122,7 +122,7 @@ protected:
|
||||
{
|
||||
TC_LOG_DEBUG("misc", "Network Thread Starting");
|
||||
|
||||
_updateTimer.expires_from_now(boost::posix_time::milliseconds(1));
|
||||
_updateTimer.expires_after(1ms);
|
||||
_updateTimer.async_wait([this](boost::system::error_code const&) { Update(); });
|
||||
_ioContext.run();
|
||||
|
||||
@@ -136,7 +136,7 @@ protected:
|
||||
if (_stopped)
|
||||
return;
|
||||
|
||||
_updateTimer.expires_from_now(boost::posix_time::milliseconds(1));
|
||||
_updateTimer.expires_after(1ms);
|
||||
_updateTimer.async_wait([this](boost::system::error_code const&) { Update(); });
|
||||
|
||||
AddNewSockets();
|
||||
|
||||
@@ -167,7 +167,7 @@ void RealmList::UpdateRealms(boost::system::error_code const& error)
|
||||
|
||||
if (_updateInterval)
|
||||
{
|
||||
_updateTimer->expires_from_now(boost::posix_time::seconds(_updateInterval));
|
||||
_updateTimer->expires_after(std::chrono::seconds(_updateInterval));
|
||||
_updateTimer->async_wait(std::bind(&RealmList::UpdateRealms, this, std::placeholders::_1));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user