mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2024-12-22 20:17:24 +08:00
revert: Tracked player update rate change (#3463)
This commit is contained in:
parent
1458c1f332
commit
2c20b0b863
@ -323,14 +323,18 @@ namespace big
|
|||||||
first_time = false;
|
first_time = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static auto last_update = std::chrono::high_resolution_clock::now() - 45s;
|
||||||
|
|
||||||
while (g_running && g.player_db.update_player_online_states)
|
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;
|
updating = true;
|
||||||
g_fiber_pool->queue_job([this] {
|
g_fiber_pool->queue_job([this] {
|
||||||
update_player_states(true);
|
update_player_states(true);
|
||||||
updating = false;
|
updating = false;
|
||||||
|
last_update = std::chrono::high_resolution_clock::now();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user