summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Reams <jbreams@mongodb.com>2016-09-16 11:08:16 -0400
committerJonathan Reams <jbreams@mongodb.com>2016-09-16 11:08:16 -0400
commit4fd7b06b54be86e692ae22ce02db6e4d3258831b (patch)
treed7154d703cd6d077a05df1dea1402fae27179bf2
parente3b42fd990070f48c11b233cec0c198098d1a48f (diff)
downloadmongo-4fd7b06b54be86e692ae22ce02db6e4d3258831b.tar.gz
fix lint
-rw-r--r--src/mongo/stdx/thread.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/mongo/stdx/thread.h b/src/mongo/stdx/thread.h
index c85c654445a..c6bc76fa466 100644
--- a/src/mongo/stdx/thread.h
+++ b/src/mongo/stdx/thread.h
@@ -108,21 +108,22 @@ inline void swap(thread& lhs, thread& rhs) noexcept {
}
namespace this_thread {
-using std::this_thread::get_id;
-using std::this_thread::yield;
+using std::this_thread::get_id; // NOLINT
+using std::this_thread::yield; // NOLINT
#ifdef _WIN32
-using std::this_thread::sleep_for;
-using std::this_thread::sleep_until;
+using std::this_thread::sleep_for; // NOLINT
+using std::this_thread::sleep_until; // NOLINT
#else
template <class Rep, class Period>
-inline void sleep_for(const std::chrono::duration<Rep, Period>& sleep_duration) {
+inline void sleep_for(const std::chrono::duration<Rep, Period>& sleep_duration) { // NOLINT
if (sleep_duration <= sleep_duration.zero())
return;
- const auto seconds = std::chrono::duration_cast<std::chrono::seconds>(sleep_duration);
+ const auto seconds =
+ std::chrono::duration_cast<std::chrono::seconds>(sleep_duration); // NOLINT
const auto nanoseconds =
- std::chrono::duration_cast<std::chrono::nanoseconds>(sleep_duration - seconds);
+ std::chrono::duration_cast<std::chrono::nanoseconds>(sleep_duration - seconds); // NOLINT
struct timespec sleepVal = {static_cast<std::time_t>(seconds.count()),
static_cast<long>(nanoseconds.count())};
struct timespec remainVal;
@@ -132,7 +133,7 @@ inline void sleep_for(const std::chrono::duration<Rep, Period>& sleep_duration)
}
template <class Clock, class Duration>
-void sleep_until(const std::chrono::time_point<Clock, Duration>& sleep_time) {
+void sleep_until(const std::chrono::time_point<Clock, Duration>& sleep_time) { // NOLINT
const auto now = Clock::now();
sleep_for(sleep_time - now);
}