aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/base/timestamp.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/base/timestamp.cpp b/test/base/timestamp.cpp
index 23ea3b04..87b8ef8f 100644
--- a/test/base/timestamp.cpp
+++ b/test/base/timestamp.cpp
@@ -24,6 +24,7 @@
#include <thread>
#include "base/timestamp.hpp"
+#include "utils/compat/chrono_literals.hpp"
#include <cppunit/extensions/HelperMacros.h>
#include <log4cpp/Category.hh>
@@ -49,15 +50,15 @@ namespace usdx
void testWaitShorter()
{
Timestamp t;
- std::this_thread::sleep_for(std::chrono::milliseconds{500});
- CPPUNIT_ASSERT_EQUAL(t.since(std::chrono::milliseconds{600}), true);
+ std::this_thread::sleep_for(500_ms);
+ CPPUNIT_ASSERT_EQUAL(t.since(600_ms), true);
}
void testWaitLonger()
{
Timestamp t;
- std::this_thread::sleep_for(std::chrono::milliseconds{500});
- CPPUNIT_ASSERT_EQUAL(t.since(std::chrono::milliseconds{400}), false);
+ std::this_thread::sleep_for(500_ms);
+ CPPUNIT_ASSERT_EQUAL(t.since(400_ms), false);
}
};