diff --git a/Source/CTest/cmProcess.cxx b/Source/CTest/cmProcess.cxx index 0d2635df5..75db654ed 100644 --- a/Source/CTest/cmProcess.cxx +++ b/Source/CTest/cmProcess.cxx @@ -16,6 +16,7 @@ =========================================================================*/ #include +#include cmProcess::cmProcess() { @@ -43,6 +44,7 @@ bool cmProcess::StartProcess() { return false; } + this->StartTime = cmSystemTools::GetTime(); this->ProcessArgs.clear(); // put the command as arg0 this->ProcessArgs.push_back(this->Command.c_str()); @@ -210,6 +212,8 @@ bool cmProcess::IsRunning() // if the process is done, then wait for it to exit cmsysProcess_WaitForExit(this->Process, 0); this->ExitValue = cmsysProcess_GetExitValue(this->Process); + this->TotalTime = cmSystemTools::GetTime() - this->StartTime; +// std::cerr << "Time to run: " << this->TotalTime << "\n"; return false; } diff --git a/Source/CTest/cmProcess.h b/Source/CTest/cmProcess.h index 4542f05de..67a5268e4 100644 --- a/Source/CTest/cmProcess.h +++ b/Source/CTest/cmProcess.h @@ -56,6 +56,8 @@ public: private: int LastOutputPipe; double Timeout; + double StartTime; + double TotalTime; cmsysProcess* Process; std::vector StdErrorBuffer; std::vector StdOutBuffer;