From 3b7f2fbdaa89fb514b18cf610ca6c676b7f8e523 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sat, 22 Oct 2022 15:47:50 +0200 Subject: [PATCH] pattern: Display evaluation time when pattern finished running --- lib/external/pattern_language | 2 +- .../builtin/source/content/views/view_pattern_editor.cpp | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/external/pattern_language b/lib/external/pattern_language index fb3059bfa..dde9ab27b 160000 --- a/lib/external/pattern_language +++ b/lib/external/pattern_language @@ -1 +1 @@ -Subproject commit fb3059bfaa292319135ae947cc0b9ca690a2e582 +Subproject commit dde9ab27bdfd9ef0691f05a0dad8bf03fcf17ae9 diff --git a/plugins/builtin/source/content/views/view_pattern_editor.cpp b/plugins/builtin/source/content/views/view_pattern_editor.cpp index 662d06e46..8b018ad2c 100644 --- a/plugins/builtin/source/content/views/view_pattern_editor.cpp +++ b/plugins/builtin/source/content/views/view_pattern_editor.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include namespace hex::plugin::builtin { @@ -626,8 +626,14 @@ namespace hex::plugin::builtin { this->m_runningEvaluators--; this->m_lastEvaluationProcessed = false; + + this->m_lastEvaluationLog.emplace_back( + pl::core::LogConsole::Level::Info, + hex::format("Evaluation took {}", runtime->getLastRunningTime()) + ); }; + this->m_lastEvaluationResult = runtime->executeString(code, envVars, inVariables); if (!this->m_lastEvaluationResult) { this->m_lastEvaluationError = runtime->getError();