diff options
author | Brad King <brad.king@kitware.com> | 2018-01-26 13:27:15 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-01-26 13:27:37 (GMT) |
commit | f343106b19eec139764dc965f9110f503aafbf9c (patch) | |
tree | 2ad40ae416e4db8bad3c005f4650ad4d2c56f61c /Source/CTest/cmProcess.h | |
parent | b50fb70be8eb629083eb2ad2e0b413793bbdde06 (diff) | |
parent | e6a80ccfc440ac8dd5e9e5405744c2423560fc02 (diff) | |
download | CMake-f343106b19eec139764dc965f9110f503aafbf9c.zip CMake-f343106b19eec139764dc965f9110f503aafbf9c.tar.gz CMake-f343106b19eec139764dc965f9110f503aafbf9c.tar.bz2 |
Merge topic 'ctest-chrono'
e6a80ccf Make use of std::chrono throughout every component
ff62b005 CTest: add safe conversion from cmDuration to integer types
695951bc CTest: introduce cmDuration
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1592
Diffstat (limited to 'Source/CTest/cmProcess.h')
-rw-r--r-- | Source/CTest/cmProcess.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/CTest/cmProcess.h b/Source/CTest/cmProcess.h index 633be24..20e24b9 100644 --- a/Source/CTest/cmProcess.h +++ b/Source/CTest/cmProcess.h @@ -4,6 +4,7 @@ #define cmProcess_h #include "cmConfigure.h" // IWYU pragma: keep +#include "cmDuration.h" #include "cmProcessOutput.h" #include "cmUVHandlePtr.h" @@ -31,8 +32,8 @@ public: void SetCommand(const char* command); void SetCommandArguments(std::vector<std::string> const& arg); void SetWorkingDirectory(const char* dir) { this->WorkingDirectory = dir; } - void SetTimeout(std::chrono::duration<double> t) { this->Timeout = t; } - void ChangeTimeout(std::chrono::duration<double> t); + void SetTimeout(cmDuration t) { this->Timeout = t; } + void ChangeTimeout(cmDuration t); void ResetStartTime(); // Return true if the process starts bool StartProcess(uv_loop_t& loop); @@ -53,7 +54,7 @@ public: int GetId() { return this->Id; } void SetId(int id) { this->Id = id; } int GetExitValue() { return this->ExitValue; } - std::chrono::duration<double> GetTotalTime() { return this->TotalTime; } + cmDuration GetTotalTime() { return this->TotalTime; } enum class Exception { @@ -69,9 +70,9 @@ public: std::string GetExitExceptionString(); private: - std::chrono::duration<double> Timeout; + cmDuration Timeout; std::chrono::steady_clock::time_point StartTime; - std::chrono::duration<double> TotalTime; + cmDuration TotalTime; bool ReadHandleClosed = false; bool ProcessHandleClosed = false; |