diff --git a/Include/Aurora/Time/DebugBenchmark.hpp b/Include/Aurora/Time/DebugBenchmark.hpp index ff30c2a2..767f62b4 100644 --- a/Include/Aurora/Time/DebugBenchmark.hpp +++ b/Include/Aurora/Time/DebugBenchmark.hpp @@ -25,12 +25,14 @@ namespace Aurora::Time void Finish() { + if (std::exchange(finished_, true)) return; auto time = timer_.End(); Aurora::Console::Logging::LogDbg("[Benchmark] {} took {}", message_, ConvertMSToTimescaleEN(time)); } private: Timer timer_; + bool finished_ {}; AuString message_; };