diff --git a/README.md b/README.md index 39f34394..2f2c54d6 100644 --- a/README.md +++ b/README.md @@ -169,6 +169,21 @@ spdlog::flush_every(std::chrono::seconds(3)); ``` +--- +#### Stopwatch +```c++ +// Stopwatch support for spdlog (using std::chrono::high_resolution_clock). +// Displays elapsed seconds since construction as double. +#include "spdlog/stopwatch.h" +void stopwatch_example() +{ + spdlog::stopwatch sw; + spdlog::debug("Elapsed {}", sw); + spdlog::debug("Elapsed {:.3}", sw); +} + +``` + --- #### Log binary data in hex ```c++