diff options
| author | Shauren <shauren.trinity@gmail.com> | 2024-12-09 21:13:18 +0100 |
|---|---|---|
| committer | Ovahlord <dreadkiller@gmx.de> | 2024-12-12 19:58:52 +0100 |
| commit | 59c46f8a66c6edac5e7864fdb4bffccf0216ec13 (patch) | |
| tree | 9fcc9ca52a6b0a8d86d6d3c51572f88e30ca6e93 /src/server/shared | |
| parent | a0bdf2da3b4c56f977dbb6772097e0254685ccbe (diff) | |
Dep: Replace basic_deadline_timer with std::chrono based basic_waitable_timer
(cherry picked from commit c81183a6600722f3a9bb4996c0849b530fbdd1b0)
Diffstat (limited to 'src/server/shared')
| -rw-r--r-- | src/server/shared/Networking/Http/HttpService.cpp | 4 | ||||
| -rw-r--r-- | src/server/shared/Networking/NetworkThread.h | 4 | ||||
| -rw-r--r-- | src/server/shared/Realm/RealmList.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/server/shared/Networking/Http/HttpService.cpp b/src/server/shared/Networking/Http/HttpService.cpp index 8bb533d73c0..b01e27e296a 100644 --- a/src/server/shared/Networking/Http/HttpService.cpp +++ b/src/server/shared/Networking/Http/HttpService.cpp @@ -142,7 +142,7 @@ void SessionService::InitAndStoreSessionState(std::shared_ptr<SessionState> stat void SessionService::Start(Asio::IoContext& ioContext) { _inactiveSessionsKillTimer = std::make_unique<Asio::DeadlineTimer>(ioContext); - _inactiveSessionsKillTimer->expires_from_now(boost::posix_time::minutes(1)); + _inactiveSessionsKillTimer->expires_after(1min); _inactiveSessionsKillTimer->async_wait([this](boost::system::error_code const& err) { if (err) @@ -255,7 +255,7 @@ void SessionService::KillInactiveSessions() } } - _inactiveSessionsKillTimer->expires_from_now(boost::posix_time::minutes(1)); + _inactiveSessionsKillTimer->expires_after(1min); _inactiveSessionsKillTimer->async_wait([this](boost::system::error_code const& err) { if (err) diff --git a/src/server/shared/Networking/NetworkThread.h b/src/server/shared/Networking/NetworkThread.h index 0195c48b9fc..fc7d9647fc1 100644 --- a/src/server/shared/Networking/NetworkThread.h +++ b/src/server/shared/Networking/NetworkThread.h @@ -117,7 +117,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(); @@ -131,7 +131,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(); diff --git a/src/server/shared/Realm/RealmList.cpp b/src/server/shared/Realm/RealmList.cpp index 8c5bb6751cf..fb720182bf4 100644 --- a/src/server/shared/Realm/RealmList.cpp +++ b/src/server/shared/Realm/RealmList.cpp @@ -200,7 +200,7 @@ void RealmList::UpdateRealms() if (_updateInterval) { - _updateTimer->expires_from_now(boost::posix_time::seconds(_updateInterval)); + _updateTimer->expires_after(std::chrono::seconds(_updateInterval)); _updateTimer->async_wait([this](boost::system::error_code const& error) { if (error) |
