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/cmCTestTestCommand.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/cmCTestTestCommand.cxx')
-rw-r--r-- | Source/CTest/cmCTestTestCommand.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/CTest/cmCTestTestCommand.cxx b/Source/CTest/cmCTestTestCommand.cxx index 232bd58..daedf62 100644 --- a/Source/CTest/cmCTestTestCommand.cxx +++ b/Source/CTest/cmCTestTestCommand.cxx @@ -4,6 +4,7 @@ #include "cmCTest.h" #include "cmCTestGenericHandler.h" +#include "cmDuration.h" #include "cmMakefile.h" #include "cmSystemTools.h" @@ -37,12 +38,12 @@ cmCTestGenericHandler* cmCTestTestCommand::InitializeHandler() const char* ctestTimeout = this->Makefile->GetDefinition("CTEST_TEST_TIMEOUT"); - std::chrono::duration<double> timeout; + cmDuration timeout; if (ctestTimeout) { - timeout = std::chrono::duration<double>(atof(ctestTimeout)); + timeout = cmDuration(atof(ctestTimeout)); } else { timeout = this->CTest->GetTimeOut(); - if (timeout <= std::chrono::duration<double>::zero()) { + if (timeout <= cmDuration::zero()) { // By default use timeout of 10 minutes timeout = std::chrono::minutes(10); } |