diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-06-02 11:35:21 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-06-06 09:12:37 +0200 |
commit | 8e0c48091d4c944bec4a4c56ae49f25125262c82 (patch) | |
tree | f6d0d31e88b7db3f88fb11dc71437ea35db8e112 /vespalib/src/tests/time/time_box_test.cpp | |
parent | f54e69173d5bea16c9ee898246bc894260035631 (diff) |
Forward declare ByteBuffer and FastOS_Thread
Diffstat (limited to 'vespalib/src/tests/time/time_box_test.cpp')
-rw-r--r-- | vespalib/src/tests/time/time_box_test.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vespalib/src/tests/time/time_box_test.cpp b/vespalib/src/tests/time/time_box_test.cpp index 478d749e15d..32cf1eb66b3 100644 --- a/vespalib/src/tests/time/time_box_test.cpp +++ b/vespalib/src/tests/time/time_box_test.cpp @@ -10,13 +10,13 @@ TEST("require that long-lived timebox returns falling time left numbers") { double timeLeft = box.timeLeft(); EXPECT_TRUE(timeLeft <= last_timeLeft); last_timeLeft = timeLeft; - FastOS_Thread::Sleep(10); + std::this_thread::sleep_for(std::chrono::milliseconds(10)); } } TEST("require that short-lived timebox times out") { vespalib::TimeBox box(0.125); - FastOS_Thread::Sleep(150); + std::this_thread::sleep_for(std::chrono::milliseconds(150)); EXPECT_FALSE(box.hasTimeLeft()); EXPECT_EQUAL(box.timeLeft(), 0.0); } @@ -27,7 +27,7 @@ TEST("require that short-lived timebox always returns at least minimum time") { double timeLeft = box.timeLeft(); EXPECT_TRUE(timeLeft <= 0.250); EXPECT_TRUE(timeLeft >= 0.125); - FastOS_Thread::Sleep(30); + std::this_thread::sleep_for(std::chrono::milliseconds(30)); } EXPECT_FALSE(box.hasTimeLeft()); EXPECT_EQUAL(box.timeLeft(), 0.125); |