| 92 | } |
| 93 | |
| 94 | void TimerMap::print(std::ostream& os_in) const |
| 95 | { |
| 96 | std::ostringstream oss; |
| 97 | unsigned const width = output_width(os_in); |
| 98 | bool const with_color = is_good_terminal(os_in); |
| 99 | std::ostream& os = (with_color ? os_in : oss); |
| 100 | |
| 101 | print_header(os, this->key(), width); |
| 102 | this->print_impl(os, width, 0); |
| 103 | if (!with_color) |
| 104 | os_in << strip_ansi_csis(oss.str()); |
| 105 | |
| 106 | // print_footer() |
| 107 | os_in << std::string(width, '=') << "\n"; |
| 108 | } |
| 109 | |
| 110 | void TimerMap::print_impl(std::ostream& os, |
| 111 | unsigned const width, |