From a6f9fb5e8c397652140c359479cc06acb7f776ad Mon Sep 17 00:00:00 2001 From: surtur Date: Thu, 3 Feb 2022 03:05:09 +0100 Subject: [PATCH] chance: add lil_demo() fun --- main.cpp | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/main.cpp b/main.cpp index 2c36b68..5e438da 100644 --- a/main.cpp +++ b/main.cpp @@ -54,6 +54,22 @@ auto sigterm_handler(int sig_n) -> void { throw; } } + +auto lil_demo() -> void { + using std::chrono_literals::operator""ms; + chance::f->random_data(4); + std::this_thread::sleep_for(120ms); + chance::f->random_data(3); + chance::f->random_data(3); + std::this_thread::sleep_for(10ms); + chance::f->random_data(3); + std::this_thread::sleep_for(5000ms); + chance::f->random_data(30); + std::this_thread::sleep_for(5000ms); + chance::f->random_data(30); + std::this_thread::sleep_for(2000ms); + chance::f->random_data(1000); +} } // namespace chance @@ -69,17 +85,6 @@ int main() { using std::chrono_literals::operator""ms; chance::f->random_data(4); // number of bytes requested std::this_thread::sleep_for(7777ms); // enough time for p0 == 64 - chance::f->random_data(4); - std::this_thread::sleep_for(120ms); - chance::f->random_data(3); - chance::f->random_data(3); - std::this_thread::sleep_for(10ms); - chance::f->random_data(3); - std::this_thread::sleep_for(5000ms); - chance::f->random_data(30); - std::this_thread::sleep_for(5000ms); - chance::f->random_data(30); - std::this_thread::sleep_for(2000ms); if (chance::AUTOSTOP) { auto err{chance::f->stop_running()};