| 52 | } |
| 53 | |
| 54 | std::string timestamp_seconds_local() { |
| 55 | const auto now = std::chrono::system_clock::now(); |
| 56 | const std::time_t now_time = std::chrono::system_clock::to_time_t(now); |
| 57 | std::tm local_tm{}; |
| 58 | #if defined(_WIN32) |
| 59 | localtime_s(&local_tm, &now_time); |
| 60 | #else |
| 61 | localtime_r(&now_time, &local_tm); |
| 62 | #endif |
| 63 | std::ostringstream out; |
| 64 | out << std::put_time(&local_tm, "%Y%m%d-%H%M%S"); |
| 65 | return out.str(); |
| 66 | } |
| 67 | |
| 68 | std::string format_scalar_double(double value) { |
| 69 | char buffer[64]; |
no test coverage detected