| 18 | #include <vector> |
| 19 | |
| 20 | static std::string format_time(const std::chrono::system_clock::time_point & now, const std::string & format) { |
| 21 | auto time = std::chrono::system_clock::to_time_t(now); |
| 22 | auto local_time = *std::localtime(&time); |
| 23 | std::ostringstream ss; |
| 24 | ss << std::put_time(&local_time, format.c_str()); |
| 25 | auto res = ss.str(); |
| 26 | return res; |
| 27 | } |
| 28 | |
| 29 | static std::string string_diff(const std::string & last, const std::string & current) { |
| 30 | if (last.empty()) { |
no test coverage detected