From f9feadaeb68c4470910979cb5ef05de9a827006f Mon Sep 17 00:00:00 2001 From: FlafyDev Date: Thu, 30 May 2024 06:49:38 +0300 Subject: [PATCH] debug --- src/managers/auto_nong_manager.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/managers/auto_nong_manager.cpp b/src/managers/auto_nong_manager.cpp index 68e86b2..c44a083 100644 --- a/src/managers/auto_nong_manager.cpp +++ b/src/managers/auto_nong_manager.cpp @@ -18,6 +18,13 @@ bool AutoNongManager::anySongExists(std::set songIDs) { void AutoNongManager::loadIndexesSchedule(float) { loadIndexes(); } +void _execute_with_delay(std::function callback, int delay_seconds) { + std::thread([callback, delay_seconds]() { + std::this_thread::sleep_for(std::chrono::seconds(delay_seconds)); + callback(); + }).detach(); +} + void AutoNongManager::loadIndexes() { std::vector indexes = Mod::get()->getSettingValue("indexes").m_strings; @@ -42,6 +49,10 @@ void AutoNongManager::loadIndexes() { log::info("3"); jsonString = decompressGz(rVec); log::info("4 {}", jsonString); + log::info("Pausing for 5 seconds..."); + std::this_thread::sleep_for(std::chrono::seconds(5)); + log::info("Resuming..."); + log::info("4.5 {}", jsonString); } else { log::info("5"); jsonString = std::string(rVec.begin(), rVec.end());