diff options
Diffstat (limited to 'staging_vespalib/src/tests/timer/timer_test.cpp')
-rw-r--r-- | staging_vespalib/src/tests/timer/timer_test.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/staging_vespalib/src/tests/timer/timer_test.cpp b/staging_vespalib/src/tests/timer/timer_test.cpp index 5472ad6e23f..04b541e75e9 100644 --- a/staging_vespalib/src/tests/timer/timer_test.cpp +++ b/staging_vespalib/src/tests/timer/timer_test.cpp @@ -37,8 +37,8 @@ void Test::testScheduling() vespalib::CountDownLatch latch1(3); vespalib::CountDownLatch latch2(2); ScheduledExecutor timer; - timer.scheduleAtFixedRate(Task::UP(new TestTask(latch1)), 0.1, 0.2); - timer.scheduleAtFixedRate(Task::UP(new TestTask(latch2)), 0.5, 0.5); + timer.scheduleAtFixedRate(Task::UP(new TestTask(latch1)), 100ms, 200ms); + timer.scheduleAtFixedRate(Task::UP(new TestTask(latch2)), 500ms, 500ms); EXPECT_TRUE(latch1.await(60000)); EXPECT_TRUE(latch2.await(60000)); } @@ -47,10 +47,10 @@ void Test::testReset() { vespalib::CountDownLatch latch1(2); ScheduledExecutor timer; - timer.scheduleAtFixedRate(Task::UP(new TestTask(latch1)), 2.0, 3.0); + timer.scheduleAtFixedRate(std::make_unique<TestTask>(latch1), 2s, 3s); timer.reset(); EXPECT_TRUE(!latch1.await(3000)); - timer.scheduleAtFixedRate(Task::UP(new TestTask(latch1)), 0.2, 0.3); + timer.scheduleAtFixedRate(std::make_unique<TestTask>(latch1), 200ms, 300ms); EXPECT_TRUE(latch1.await(60000)); } |