MCPcopy Create free account
hub / github.com/KTH-RPL/dufomap / tick

Method tick

src/indicators.hpp:2692–2707  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2690 }
2691
2692 void tick() {
2693 {
2694 std::lock_guard<std::mutex> lock{mutex_};
2695 if (get_value<details::ProgressBarOption::completed>())
2696 return;
2697
2698 progress_ += (direction_ == Direction::forward) ? 1 : -1;
2699 if (direction_ == Direction::forward && progress_ == max_progress_) {
2700 // time to go back
2701 direction_ = Direction::backward;
2702 } else if (direction_ == Direction::backward && progress_ == 0) {
2703 direction_ = Direction::forward;
2704 }
2705 }
2706 print_progress();
2707 }
2708
2709 bool is_completed() { return get_value<details::ProgressBarOption::completed>(); }
2710

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected