diff options
author | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-04-03 09:55:02 +0200 |
---|---|---|
committer | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-04-04 12:33:59 +0200 |
commit | fa1d8044abc2cd0f149a2d526b3b03441443cdb0 (patch) | |
tree | 153d9aed697162b73b79a57c39b8061cd66fc8a5 /src/test/txindex_tests.cpp | |
parent | fa454dcb20b9e7943cc25e6eeea72912b5f1c7b5 (diff) |
test: Use steady clock in index tests
Diffstat (limited to 'src/test/txindex_tests.cpp')
-rw-r--r-- | src/test/txindex_tests.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/txindex_tests.cpp b/src/test/txindex_tests.cpp index b9bfa65c0a..b666517ae2 100644 --- a/src/test/txindex_tests.cpp +++ b/src/test/txindex_tests.cpp @@ -32,10 +32,10 @@ BOOST_FIXTURE_TEST_CASE(txindex_initial_sync, TestChain100Setup) BOOST_REQUIRE(txindex.Start()); // Allow tx index to catch up with the block index. - constexpr int64_t timeout_ms = 10 * 1000; - int64_t time_start = GetTimeMillis(); + constexpr auto timeout{10s}; + const auto time_start{SteadyClock::now()}; while (!txindex.BlockUntilSyncedToCurrentChain()) { - BOOST_REQUIRE(time_start + timeout_ms > GetTimeMillis()); + BOOST_REQUIRE(time_start + timeout > SteadyClock::now()); UninterruptibleSleep(std::chrono::milliseconds{100}); } |