mirror of
https://github.com/gabime/spdlog.git
synced 2025-04-01 02:42:41 +08:00
Fixed warning
This commit is contained in:
parent
232aace328
commit
ca7c846089
@ -36,8 +36,10 @@ public:
|
|||||||
stopwatch()
|
stopwatch()
|
||||||
: start_tp_{clock::now()} {}
|
: start_tp_{clock::now()} {}
|
||||||
|
|
||||||
|
[[nodiscard]]
|
||||||
std::chrono::duration<double> elapsed() const { return std::chrono::duration<double>(clock::now() - start_tp_); }
|
std::chrono::duration<double> elapsed() const { return std::chrono::duration<double>(clock::now() - start_tp_); }
|
||||||
|
|
||||||
|
[[nodiscard]]
|
||||||
std::chrono::milliseconds elapsed_ms() const {
|
std::chrono::milliseconds elapsed_ms() const {
|
||||||
return std::chrono::duration_cast<std::chrono::milliseconds>(clock::now() - start_tp_);
|
return std::chrono::duration_cast<std::chrono::milliseconds>(clock::now() - start_tp_);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user