diff options
author | Brad King <brad.king@kitware.com> | 2017-12-08 13:22:15 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-12-08 16:09:49 (GMT) |
commit | 548e8f6ffedb57fcdee56633ba454ae0ddf38983 (patch) | |
tree | 31e77da99bac6397669e597739d7de8d5197d61f /Source/CTest/cmCTestCoverageHandler.cxx | |
parent | de0035fdcccb4c8acc92bf1db0a76b3c1f18003f (diff) | |
download | CMake-548e8f6ffedb57fcdee56633ba454ae0ddf38983.zip CMake-548e8f6ffedb57fcdee56633ba454ae0ddf38983.tar.gz CMake-548e8f6ffedb57fcdee56633ba454ae0ddf38983.tar.bz2 |
CTest: Simplify std::chrono::duration<double> conversion to double
The ratio of ticks to seconds for this type is 1, so we can just use its
`count()` directly. This also avoids converting through the integer
representation of `std::chrono::milliseconds`, which has a much smaller
allowed range.
Drop our `cmsysProcess_SetTimeout` wrapper as it is now very thin.
Diffstat (limited to 'Source/CTest/cmCTestCoverageHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestCoverageHandler.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index 39b90d8..2a9fd72 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -11,7 +11,6 @@ #include "cmParseGTMCoverage.h" #include "cmParseJacocoCoverage.h" #include "cmParsePHPCoverage.h" -#include "cmProcess.h" #include "cmSystemTools.h" #include "cmWorkingDirectory.h" #include "cmXMLWriter.h" @@ -81,7 +80,7 @@ public: cmsysProcess_SetOption(this->Process, cmsysProcess_Option_HideWindow, 1); if (this->TimeOut >= std::chrono::duration<double>::zero()) { - cmsysProcess_SetTimeout(this->Process, this->TimeOut); + cmsysProcess_SetTimeout(this->Process, this->TimeOut.count()); } cmsysProcess_Execute(this->Process); this->PipeState = cmsysProcess_GetState(this->Process); |