Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <shogun/base/init.h>
- #include <shogun/base/progress.h>
- #include <shogun/io/SGIO.h>
- #include <thread>
- #include <chrono>
- #include <iostream>
- #include <functional>
- using namespace shogun;
- int main() {
- init_shogun_with_defaults();
- SGIO tmp;
- tmp.enable_progress();
- /* Stops before the 6th iteration */
- for (int i : PRange<int>(range(0, 10), tmp, [&]() { return i>5 ? true : false;}))
- {
- std::this_thread::sleep_for(std::chrono::milliseconds(1000));
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement