diff --git a/src/server/game/Scripting/ScriptReloadMgr.cpp b/src/server/game/Scripting/ScriptReloadMgr.cpp index de65ae20b05..a66ef84c88c 100644 --- a/src/server/game/Scripting/ScriptReloadMgr.cpp +++ b/src/server/game/Scripting/ScriptReloadMgr.cpp @@ -409,6 +409,8 @@ class HotSwapScriptReloadMgr final // like "Release" or "Debug". The build directive from the // previous same module is used if there was any. std::string script_module_build_directive_; + // The time where the build job started + uint32 start_time_; // Type of the current running job BuildJobType type_; @@ -421,7 +423,7 @@ class HotSwapScriptReloadMgr final : script_module_name_(std::move(script_module_name)), script_module_project_name_(std::move(script_module_project_name)), script_module_build_directive_(std::move(script_module_build_directive)), - type_(BuildJobType::BUILD_JOB_NONE) { } + start_time_(getMSTime()), type_(BuildJobType::BUILD_JOB_NONE) { } bool IsValid() const { @@ -434,6 +436,8 @@ class HotSwapScriptReloadMgr final std::string const& GetBuildDirective() const { return script_module_build_directive_; } + uint32 GetTimeFromStart() const { return GetMSTimeDiffToNow(start_time_); } + BuildJobType GetType() const { return type_; } std::shared_ptr const& GetProcess() const @@ -1112,8 +1116,9 @@ private: if (!error) { // Installation was successful - TC_LOG_INFO("scripts.hotswap", ">> Successfully installed module %s.", - _build_job->GetModuleName().c_str()); + TC_LOG_INFO("scripts.hotswap", ">> Successfully installed module %s in %us", + _build_job->GetModuleName().c_str(), + _build_job->GetTimeFromStart() / IN_MILLISECONDS); } else {