Fix invalid command profiling logic
This commit is contained in:
parent
8fdda6d980
commit
49e2ecdcdb
|
@ -514,7 +514,7 @@ void CommandManager::execute_single_command(CommandParameters params,
|
||||||
if (debug_flags & DebugFlags::Commands)
|
if (debug_flags & DebugFlags::Commands)
|
||||||
write_to_debug_buffer(format("command {}", join(params, ' ')));
|
write_to_debug_buffer(format("command {}", join(params, ' ')));
|
||||||
|
|
||||||
on_scope_end([&] {
|
auto profile = on_scope_end([&] {
|
||||||
if (not (debug_flags & DebugFlags::Profile))
|
if (not (debug_flags & DebugFlags::Profile))
|
||||||
return;
|
return;
|
||||||
auto full = std::chrono::duration_cast<std::chrono::microseconds>(Clock::now() - start);
|
auto full = std::chrono::duration_cast<std::chrono::microseconds>(Clock::now() - start);
|
||||||
|
|
|
@ -61,7 +61,7 @@ Singleton<T>* Singleton<T>::ms_instance = nullptr;
|
||||||
// This permits to cleanup c-style resources without implementing
|
// This permits to cleanup c-style resources without implementing
|
||||||
// a wrapping class
|
// a wrapping class
|
||||||
template<typename T>
|
template<typename T>
|
||||||
class OnScopeEnd
|
class [[nodiscard]] OnScopeEnd
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
[[gnu::always_inline]]
|
[[gnu::always_inline]]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user