diff options
author | Wouter Klouwen <wouter.klouwen@youview.com> | 2017-12-12 20:54:01 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-01-23 15:04:38 (GMT) |
commit | 695951bc46fa4bc4eaf686c4ee6dce24c579bc45 (patch) | |
tree | 951a8e3d7f78d9cb9ec892a35fd15dab1a4f9d97 /Source/CTest/cmProcess.cxx | |
parent | 9c52b587b6dfa54266bcebbe7e111d7dde437a75 (diff) | |
download | CMake-695951bc46fa4bc4eaf686c4ee6dce24c579bc45.zip CMake-695951bc46fa4bc4eaf686c4ee6dce24c579bc45.tar.gz CMake-695951bc46fa4bc4eaf686c4ee6dce24c579bc45.tar.bz2 |
CTest: introduce cmDuration
This commit introduces cmDuration as a typedef for
std::chrono::duration<double, std::ratio<1>>. It is less verbose and
provides for a point to put future common functionality for durations.
No functional change intended.
Diffstat (limited to 'Source/CTest/cmProcess.cxx')
-rw-r--r-- | Source/CTest/cmProcess.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/CTest/cmProcess.cxx b/Source/CTest/cmProcess.cxx index e332a77..09ed0a9 100644 --- a/Source/CTest/cmProcess.cxx +++ b/Source/CTest/cmProcess.cxx @@ -62,8 +62,8 @@ cmProcess::cmProcess(cmCTestRunTest& runner) : Runner(runner) , Conv(cmProcessOutput::UTF8, CM_PROCESS_BUF_SIZE) { - this->Timeout = std::chrono::duration<double>::zero(); - this->TotalTime = std::chrono::duration<double>::zero(); + this->Timeout = cmDuration::zero(); + this->TotalTime = cmDuration::zero(); this->ExitValue = 0; this->Id = 0; this->StartTime = std::chrono::steady_clock::time_point(); @@ -344,8 +344,8 @@ void cmProcess::OnExit(int64_t exit_status, int term_signal) // negative. If someone changed the system clock while the process was // running this may be even more. Make sure not to report a negative // duration here. - if (this->TotalTime <= std::chrono::duration<double>::zero()) { - this->TotalTime = std::chrono::duration<double>::zero(); + if (this->TotalTime <= cmDuration::zero()) { + this->TotalTime = cmDuration::zero(); } this->ProcessHandleClosed = true; @@ -360,7 +360,7 @@ cmProcess::State cmProcess::GetProcessStatus() return this->ProcessState; } -void cmProcess::ChangeTimeout(std::chrono::duration<double> t) +void cmProcess::ChangeTimeout(cmDuration t) { this->Timeout = t; this->StartTimer(); |