chance: add lil_demo() fun
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
ffd0180578
commit
a6f9fb5e8c
27
main.cpp
27
main.cpp
|
@ -54,6 +54,22 @@ auto sigterm_handler(int sig_n) -> void {
|
||||||
throw;
|
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
|
} // namespace chance
|
||||||
|
|
||||||
|
|
||||||
|
@ -69,17 +85,6 @@ int main() {
|
||||||
using std::chrono_literals::operator""ms;
|
using std::chrono_literals::operator""ms;
|
||||||
chance::f->random_data(4); // number of bytes requested
|
chance::f->random_data(4); // number of bytes requested
|
||||||
std::this_thread::sleep_for(7777ms); // enough time for p0 == 64
|
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) {
|
if (chance::AUTOSTOP) {
|
||||||
auto err{chance::f->stop_running()};
|
auto err{chance::f->stop_running()};
|
||||||
|
|
Reference in New Issue