diff --git a/test/swarm_suite.cpp b/test/swarm_suite.cpp index 0feea40f8..57ed4578a 100644 --- a/test/swarm_suite.cpp +++ b/test/swarm_suite.cpp @@ -191,10 +191,10 @@ void test_swarm(int flags) ses3.remove_torrent(tor3, lt::session::delete_files); std::auto_ptr a = ses1.pop_alert(); - time_point end = aux::time_now() + seconds(20); + time_point end = clock_type::now() + seconds(20); while (a.get() == 0 || alert_cast(a.get()) == 0) { - if (ses1.wait_for_alert(end - aux::time_now()) == 0) + if (ses1.wait_for_alert(end - clock_type::now()) == 0) { std::cerr << "wait_for_alert() expired" << std::endl; break; @@ -216,7 +216,7 @@ void test_swarm(int flags) { a = ses1.pop_alert(); std::cerr << ret->message() << std::endl; - start = aux::time_now(); + start = clock_type::now(); } // this allows shutting down the sessions in parallel diff --git a/test/test_dos_blocker.cpp b/test/test_dos_blocker.cpp index 0b12132d1..3e8b5f8f1 100644 --- a/test/test_dos_blocker.cpp +++ b/test/test_dos_blocker.cpp @@ -46,7 +46,7 @@ int test_main() address spammer = address_v4::from_string("10.10.10.10"); - time_point now = aux::time_now(); + time_point now = clock_type::now(); for (int i = 0; i < 1000; ++i) { b.incoming(spammer, now); diff --git a/test/test_storage.cpp b/test/test_storage.cpp index e7f78c07d..20a3510e5 100644 --- a/test/test_storage.cpp +++ b/test/test_storage.cpp @@ -678,12 +678,12 @@ void test_fastresume(std::string const& test_path) torrent_handle h = ses.add_torrent(p, ec); std::auto_ptr a = ses.pop_alert(); - time_point end = aux::time_now() + seconds(20); - while (aux::time_now() < end + time_point end = clock_type::now() + seconds(20); + while (clock_type::now() < end && (a.get() == 0 || alert_cast(a.get()) == 0)) { - if (ses.wait_for_alert(end - aux::time_now()) == 0) + if (ses.wait_for_alert(end - clock_type::now()) == 0) { std::cerr << "wait_for_alert() expired" << std::endl; break;