From d345a72a342eaceafa095b4b9b193d5eb50fea2b Mon Sep 17 00:00:00 2001 From: Andreas Maerten <24669514+Yimura@users.noreply.github.com> Date: Sun, 28 Jul 2024 23:33:47 +0200 Subject: [PATCH] revert: Tracked player update rate change (#3463) --- src/services/player_database/player_database_service.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/services/player_database/player_database_service.cpp b/src/services/player_database/player_database_service.cpp index 1c411488..ed1b780b 100644 --- a/src/services/player_database/player_database_service.cpp +++ b/src/services/player_database/player_database_service.cpp @@ -323,14 +323,18 @@ namespace big first_time = false; } + static auto last_update = std::chrono::high_resolution_clock::now() - 45s; + while (g_running && g.player_db.update_player_online_states) { - if (!updating) + const auto cur = std::chrono::high_resolution_clock::now(); + if (cur - last_update > 45s && !updating) { updating = true; g_fiber_pool->queue_job([this] { update_player_states(true); updating = false; + last_update = std::chrono::high_resolution_clock::now(); }); }