| 33 | } |
| 34 | |
| 35 | void restart(uint64_t expected_count, std::string pre_msg = "") |
| 36 | { |
| 37 | count_ = 0; |
| 38 | next_tic_count_ = 0; |
| 39 | tic_ = 0; |
| 40 | expected_count_ = expected_count; |
| 41 | if (expected_count_ == 0) { |
| 42 | expected_count_ = 1; |
| 43 | } |
| 44 | if (!pre_msg.empty()) { |
| 45 | elog(INFO, "\n%s", pre_msg.c_str()); |
| 46 | } |
| 47 | msg_ = default_msg_; |
| 48 | const std::string msg = "\n0% 10 20 30 40 50 60 70 80 90 100%\n" |
| 49 | "|----|----|----|----|----|----|----|----|----|----|\n"; |
| 50 | elog(INFO, "%s", msg.c_str()); |
| 51 | } |
| 52 | |
| 53 | inline uint64_t operator+=(uint64_t increment) noexcept |
| 54 | { |