| 2905 | : start_it(start_it) {} |
| 2906 | |
| 2907 | void stop() { |
| 2908 | if (start_it) { |
| 2909 | auto end = std::chrono::high_resolution_clock::now(); |
| 2910 | auto duration = std::chrono::duration<double, std::milli>(end - start_it.value()->second).count(); |
| 2911 | std::cerr << "Timing for " << start_it.value()->first << ": " << duration << " ms" << std::endl; |
| 2912 | } |
| 2913 | } |
| 2914 | |
| 2915 | private: |
| 2916 | std::optional<std::map<std::string, std::chrono::high_resolution_clock::time_point>::const_iterator> start_it; |
no test coverage detected