Added stopwatch example to README.md

This commit is contained in:
gabime 2020-08-29 03:46:29 +03:00
parent d6329b9dce
commit 0348556aac

View File

@ -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++