From f53a5823e71d787348d56f7c23eff08feb32918c Mon Sep 17 00:00:00 2001 From: Craig Edwards Date: Sat, 16 Nov 2024 18:18:47 +0000 Subject: [PATCH] sleep() shouldnt be used, instead use std::this_thread::sleep_for(std::chrono::seconds(6)) --- src/unittest/test.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/unittest/test.cpp b/src/unittest/test.cpp index 5a42138606..c108c4068c 100644 --- a/src/unittest/test.cpp +++ b/src/unittest/test.cpp @@ -2290,7 +2290,7 @@ Markdown lol \\|\\|spoiler\\|\\| \\~\\~strikethrough\\~\\~ \\`small \\*code\\* b set_test(HTTPS, hdr1 == "cloudflare" && c->get_status() == 200); } ); - sleep(6); + std::this_thread::sleep_for(std::chrono::seconds(6)); } catch (const dpp::exception& e) { std::cout << e.what() << "\n"; @@ -2305,7 +2305,7 @@ Markdown lol \\|\\|spoiler\\|\\| \\~\\~strikethrough\\~\\~ \\`small \\*code\\* b std::string content2 = c2->get_content(); set_test(HTTP, hdr2 == "https://github.com/" && c2->get_status() == 301); }); - sleep(6); + std::this_thread::sleep_for(std::chrono::seconds(6)); } catch (const dpp::exception& e) { std::cout << e.what() << "\n"; @@ -2320,7 +2320,7 @@ Markdown lol \\|\\|spoiler\\|\\| \\~\\~strikethrough\\~\\~ \\`small \\*code\\* b // Google sets a bunch of cookies when we start accessing it. set_test(MULTIHEADER, c2->get_status() == 200 && count > 1 && count == count_list); }); - sleep(6); + std::this_thread::sleep_for(std::chrono::seconds(6)); } catch (const dpp::exception& e) { std::cout << e.what() << "\n";