Dep: Replace basic_deadline_timer with std::chrono based basic_waitable_timer

(cherry picked from commit c81183a660)
This commit is contained in:
Shauren
2024-12-09 21:13:18 +01:00
parent 8785c0d5a5
commit 1942647c0d
6 changed files with 37 additions and 38 deletions

View File

@@ -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();

View File

@@ -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));
}
}