summaryrefslogtreecommitdiff
path: root/src/mongo/executor/network_test_env.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/executor/network_test_env.h')
-rw-r--r--src/mongo/executor/network_test_env.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/executor/network_test_env.h b/src/mongo/executor/network_test_env.h
index 9fe53f07e2c..e83311b7bc4 100644
--- a/src/mongo/executor/network_test_env.h
+++ b/src/mongo/executor/network_test_env.h
@@ -38,6 +38,7 @@
#include "mongo/stdx/future.h"
#include "mongo/stdx/thread.h"
#include "mongo/unittest/unittest.h"
+#include "mongo/util/time_support.h"
namespace mongo {
@@ -99,6 +100,11 @@ public:
return _future.get();
}
+ template <class Period>
+ T timed_get(const Duration<Period>& timeout_duration) {
+ return timed_get(timeout_duration.toSystemDuration());
+ }
+
private:
stdx::future<T> _future;
executor::TaskExecutor* _executor;