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.
This commit is contained in:
Brad King
2017-12-08 08:22:15 -05:00
parent de0035fdcc
commit 548e8f6ffe
6 changed files with 13 additions and 52 deletions

View File

@@ -10,13 +10,6 @@
#include <string>
#include <vector>
/*
* A wrapper function for cmsysProcess_SetTimeout that takes an
* std::chrono::duration. For convenience only.
*/
void cmsysProcess_SetTimeout(cmsysProcess* process,
std::chrono::duration<double> timeout);
/** \class cmProcess
* \brief run a process with c++
*