Upgraded spdlog to v1.11.0

This commit is contained in:
Bartek Kryza
2023-06-03 18:00:54 +02:00
parent a78839eecf
commit 12f129a6fe
72 changed files with 6797 additions and 4117 deletions

View File

@@ -4,6 +4,7 @@
#pragma once
#include <spdlog/fmt/fmt.h>
#include <chrono>
// Stopwatch support for spdlog (using std::chrono::steady_clock).
// Displays elapsed seconds since construction as double.
@@ -42,13 +43,20 @@ public:
void reset()
{
start_tp_ = clock ::now();
start_tp_ = clock::now();
}
};
} // namespace spdlog
// Support for fmt formatting (e.g. "{:012.9}" or just "{}")
namespace fmt {
namespace
#ifdef SPDLOG_USE_STD_FORMAT
std
#else
fmt
#endif
{
template<>
struct formatter<spdlog::stopwatch> : formatter<double>
{
@@ -58,4 +66,4 @@ struct formatter<spdlog::stopwatch> : formatter<double>
return formatter<double>::format(sw.elapsed().count(), ctx);
}
};
} // namespace fmt
} // namespace std