summaryrefslogtreecommitdiff
path: root/ACE/ace/Process_Manager.h
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2015-06-29 19:52:49 +0200
committerJohnny Willemsen <jwillemsen@remedy.nl>2015-06-29 19:52:49 +0200
commitce529b4bc2b80e512f6146c36320e86ace287716 (patch)
tree1daf10a7d39077bfa00424bd03c220dc3a66bf25 /ACE/ace/Process_Manager.h
parent59885c8648ae1015fc95091a7acea4f7f0b4008b (diff)
downloadATCD-ce529b4bc2b80e512f6146c36320e86ace287716.tar.gz
Added support to use the wait operations of the ACE process manager using std::chrono::duration as alternative to ACE_Time_Value
* ACE/ace/Process_Manager.h: * ACE/tests/Process_Manager_Test.cpp:
Diffstat (limited to 'ACE/ace/Process_Manager.h')
-rw-r--r--ACE/ace/Process_Manager.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/ACE/ace/Process_Manager.h b/ACE/ace/Process_Manager.h
index bd320c87f7b..d10f253298e 100644
--- a/ACE/ace/Process_Manager.h
+++ b/ACE/ace/Process_Manager.h
@@ -243,6 +243,15 @@ public:
* @retval 0 on success; -1 on failure.
*/
int wait (const ACE_Time_Value &timeout = ACE_Time_Value::max_time);
+#if defined (ACE_HAS_CPP11)
+ /// @sa wait
+ template< class Rep, class Period >
+ int wait (const std::chrono::duration<Rep, Period>& timeout)
+ {
+ ACE_Time_Value const tv (timeout);
+ return this->wait (tv);
+ }
+#endif
/**
* Wait up to @a timeout for a single specified process to terminate.
@@ -260,6 +269,17 @@ public:
pid_t wait (pid_t pid,
const ACE_Time_Value &timeout,
ACE_exitcode *status = 0);
+#if defined (ACE_HAS_CPP11)
+ /// @sa wait
+ template< class Rep, class Period >
+ pid_t wait (pid_t pid,
+ const std::chrono::duration<Rep, Period>& timeout,
+ ACE_exitcode *status = 0)
+ {
+ ACE_Time_Value const tv (timeout);
+ return this->wait (pid, tv, status);
+ }
+#endif
/**
* Wait indefinitely for a single, specified process to terminate.