summaryrefslogtreecommitdiffstats
path: root/staging_vespalib/src/tests/clock/clock_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'staging_vespalib/src/tests/clock/clock_test.cpp')
-rw-r--r--staging_vespalib/src/tests/clock/clock_test.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/staging_vespalib/src/tests/clock/clock_test.cpp b/staging_vespalib/src/tests/clock/clock_test.cpp
index b5650244a45..4a06787fce5 100644
--- a/staging_vespalib/src/tests/clock/clock_test.cpp
+++ b/staging_vespalib/src/tests/clock/clock_test.cpp
@@ -2,11 +2,11 @@
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/vespalib/util/clock.h>
-#include <vespa/vespalib/util/time.h>
#include <vespa/fastos/thread.h>
using vespalib::Clock;
-using fastos::TimeStamp;
+using vespalib::duration;
+using vespalib::steady_time;
TEST("Test that clock is ticking forward") {
@@ -14,15 +14,15 @@ TEST("Test that clock is ticking forward") {
Clock clock(0.050);
FastOS_ThreadPool pool(0x10000);
ASSERT_TRUE(pool.NewThread(clock.getRunnable(), nullptr) != nullptr);
- fastos::SteadyTimeStamp start = clock.getTimeNS();
+ steady_time start = clock.getTimeNS();
std::this_thread::sleep_for(5s);
- fastos::SteadyTimeStamp stop = clock.getTimeNS();
+ steady_time stop = clock.getTimeNS();
EXPECT_TRUE(stop > start);
std::this_thread::sleep_for(6s);
clock.stop();
- fastos::SteadyTimeStamp stop2 = clock.getTimeNS();
+ steady_time stop2 = clock.getTimeNS();
EXPECT_TRUE(stop2 > stop);
- EXPECT_TRUE((stop2 - stop)/TimeStamp::MICRO > 1000);
+ EXPECT_TRUE(vespalib::count_ms(stop2 - stop) > 1000);
}
TEST_MAIN() { TEST_RUN_ALL(); } \ No newline at end of file