summaryrefslogtreecommitdiff
path: root/src/mongo/util/time_support.h
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2015-10-26 14:43:59 -0400
committerRandolph Tan <randolph@10gen.com>2015-10-29 16:54:24 -0400
commitbdc6b623c323a6616c3efdfdb5fed38422c75d11 (patch)
tree9215f8e6fcda5afdfeb8a93c151a16ffd358dd24 /src/mongo/util/time_support.h
parentc636d8092e4a31f602cd1cc42534d5365bdf9cf1 (diff)
downloadmongo-bdc6b623c323a6616c3efdfdb5fed38422c75d11.tar.gz
SERVER-21109 Add helper for waiting a balancing round in js tests
Diffstat (limited to 'src/mongo/util/time_support.h')
-rw-r--r--src/mongo/util/time_support.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mongo/util/time_support.h b/src/mongo/util/time_support.h
index 9573ec65d1d..ca9fa2162f5 100644
--- a/src/mongo/util/time_support.h
+++ b/src/mongo/util/time_support.h
@@ -324,7 +324,11 @@ bool toPointInTime(const std::string& str, boost::posix_time::ptime* timeOfDay);
void sleepsecs(int s);
void sleepmillis(long long ms);
void sleepmicros(long long micros);
-void sleepFor(const Milliseconds& time);
+
+template <typename DurationType>
+void sleepFor(DurationType time) {
+ sleepmicros(durationCount<Microseconds>(time));
+}
class Backoff {
public: