[*] Benchmark util shouldn't double print on dtor if Finish was already called
This commit is contained in:
parent
9a93d4ec8d
commit
6e1037200c
@ -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_;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user