/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/thread/futures/futures.async/ |
D | async.pass.cpp | 25 typedef std::chrono::milliseconds ms; typedef 29 std::this_thread::sleep_for(ms(200)); in f0() 37 std::this_thread::sleep_for(ms(200)); in f1() 43 std::this_thread::sleep_for(ms(200)); in f2() 48 std::this_thread::sleep_for(ms(200)); in f3() 54 std::this_thread::sleep_for(ms(200)); in f4() 60 std::this_thread::sleep_for(ms(200)); in f5() 68 std::this_thread::sleep_for(ms(300)); in main() 72 assert(t1-t0 < ms(100)); in main() 76 std::this_thread::sleep_for(ms(300)); in main() [all …]
|
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/ |
D | try_lock_for.pass.cpp | 27 typedef std::chrono::milliseconds ms; typedef 33 assert(m.try_lock_for(ms(300)) == true); in f1() 36 ns d = t1 - t0 - ms(250); in f1() 37 assert(d < ms(50)); // within 50ms in f1() 43 assert(m.try_lock_for(ms(250)) == false); in f2() 45 ns d = t1 - t0 - ms(250); in f2() 46 assert(d < ms(50)); // within 50ms in f2() 54 std::this_thread::sleep_for(ms(250)); in main() 61 std::this_thread::sleep_for(ms(300)); in main()
|
D | try_lock_until.pass.cpp | 27 typedef std::chrono::milliseconds ms; typedef 33 assert(m.try_lock_until(Clock::now() + ms(300)) == true); in f1() 36 ns d = t1 - t0 - ms(250); in f1() 37 assert(d < ms(50)); // within 50ms in f1() 43 assert(m.try_lock_until(Clock::now() + ms(250)) == false); in f2() 45 ns d = t1 - t0 - ms(250); in f2() 46 assert(d < ms(50)); // within 50ms in f2() 54 std::this_thread::sleep_for(ms(250)); in main() 61 std::this_thread::sleep_for(ms(300)); in main()
|
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/ |
D | try_lock_until.pass.cpp | 27 typedef std::chrono::milliseconds ms; typedef 33 assert(m.try_lock_until(Clock::now() + ms(300)) == true); in f1() 38 ns d = t1 - t0 - ms(250); in f1() 39 assert(d < ms(50)); // within 50ms in f1() 45 assert(m.try_lock_until(Clock::now() + ms(250)) == false); in f2() 47 ns d = t1 - t0 - ms(250); in f2() 48 assert(d < ms(50)); // within 50ms in f2() 56 std::this_thread::sleep_for(ms(250)); in main() 63 std::this_thread::sleep_for(ms(300)); in main()
|
D | try_lock_for.pass.cpp | 27 typedef std::chrono::milliseconds ms; typedef 33 assert(m.try_lock_for(ms(300)) == true); in f1() 38 ns d = t1 - t0 - ms(250); in f1() 45 assert(m.try_lock_for(ms(250)) == false); in f2() 47 ns d = t1 - t0 - ms(250); in f2() 56 std::this_thread::sleep_for(ms(250)); in main() 63 std::this_thread::sleep_for(ms(300)); in main()
|
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/ |
D | try_lock_until.pass.cpp | 29 typedef std::chrono::milliseconds ms; typedef 35 assert(m.try_lock_until(Clock::now() + ms(300)) == true); in f1() 38 ns d = t1 - t0 - ms(250); in f1() 39 assert(d < ms(50)); // within 50ms in f1() 45 assert(m.try_lock_until(Clock::now() + ms(250)) == false); in f2() 47 ns d = t1 - t0 - ms(250); in f2() 48 assert(d < ms(50)); // within 50ms in f2() 59 std::this_thread::sleep_for(ms(250)); in main() 66 std::this_thread::sleep_for(ms(300)); in main()
|
D | try_lock_for.pass.cpp | 29 typedef std::chrono::milliseconds ms; typedef 35 assert(m.try_lock_for(ms(300)) == true); in f1() 38 ns d = t1 - t0 - ms(250); in f1() 39 assert(d < ms(50)); // within 50ms in f1() 45 assert(m.try_lock_for(ms(250)) == false); in f2() 47 ns d = t1 - t0 - ms(250); in f2() 48 assert(d < ms(50)); // within 50ms in f2() 59 std::this_thread::sleep_for(ms(250)); in main() 66 std::this_thread::sleep_for(ms(300)); in main()
|
D | try_lock_shared_for.pass.cpp | 30 typedef std::chrono::milliseconds ms; typedef 36 assert(m.try_lock_shared_for(ms(300)) == true); in f1() 39 ns d = t1 - t0 - ms(250); in f1() 40 assert(d < ms(50)); // within 50ms in f1() 46 assert(m.try_lock_shared_for(ms(250)) == false); in f2() 48 ns d = t1 - t0 - ms(250); in f2() 49 assert(d < ms(50)); // within 50ms in f2() 62 std::this_thread::sleep_for(ms(250)); in main() 72 std::this_thread::sleep_for(ms(300)); in main()
|
D | try_lock_shared_until.pass.cpp | 30 typedef std::chrono::milliseconds ms; typedef 36 assert(m.try_lock_shared_until(Clock::now() + ms(300)) == true); in f1() 39 ns d = t1 - t0 - ms(250); in f1() 40 assert(d < ms(50)); // within 50ms in f1() 46 assert(m.try_lock_shared_until(Clock::now() + ms(250)) == false); in f2() 48 ns d = t1 - t0 - ms(250); in f2() 49 assert(d < ms(50)); // within 50ms in f2() 62 std::this_thread::sleep_for(ms(250)); in main() 72 std::this_thread::sleep_for(ms(300)); in main()
|
D | lock_shared.pass.cpp | 29 typedef std::chrono::milliseconds ms; typedef 38 ns d = t1 - t0 - ms(250); in f() 39 assert(d < ms(50)); // within 50ms in f() 49 assert(d < ms(50)); // within 50ms in g() 61 std::this_thread::sleep_for(ms(250)); in main() 69 std::this_thread::sleep_for(ms(250)); in main()
|
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/ |
D | mutex_duration.pass.cpp | 27 typedef std::chrono::milliseconds ms; typedef 33 std::unique_lock<std::timed_mutex> lk(m, ms(300)); in f1() 36 ns d = t1 - t0 - ms(250); in f1() 37 assert(d < ms(50)); // within 50ms in f1() 43 std::unique_lock<std::timed_mutex> lk(m, ms(250)); in f2() 46 ns d = t1 - t0 - ms(250); in f2() 47 assert(d < ms(50)); // within 50ms in f2() 55 std::this_thread::sleep_for(ms(250)); in main() 62 std::this_thread::sleep_for(ms(300)); in main()
|
D | mutex_time_point.pass.cpp | 27 typedef std::chrono::milliseconds ms; typedef 33 std::unique_lock<std::timed_mutex> lk(m, Clock::now() + ms(300)); in f1() 36 ns d = t1 - t0 - ms(250); in f1() 43 std::unique_lock<std::timed_mutex> lk(m, Clock::now() + ms(250)); in f2() 46 ns d = t1 - t0 - ms(250); in f2() 47 assert(d < ms(50)); // within 50ms in f2() 55 std::this_thread::sleep_for(ms(250)); in main() 62 std::this_thread::sleep_for(ms(300)); in main()
|
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/thread/futures/futures.shared_future/ |
D | wait_for.pass.cpp | 21 typedef std::chrono::milliseconds ms; typedef 25 std::this_thread::sleep_for(ms(500)); in func1() 33 std::this_thread::sleep_for(ms(500)); in func3() 40 std::this_thread::sleep_for(ms(500)); in func5() 53 assert(f.wait_for(ms(300)) == std::future_status::timeout); in main() 55 assert(f.wait_for(ms(300)) == std::future_status::ready); in main() 61 assert(t1-t0 < ms(5)); in main() 69 assert(f.wait_for(ms(300)) == std::future_status::timeout); in main() 71 assert(f.wait_for(ms(300)) == std::future_status::ready); in main() 77 assert(t1-t0 < ms(5)); in main() [all …]
|
D | wait_until.pass.cpp | 21 typedef std::chrono::milliseconds ms; typedef 25 std::this_thread::sleep_for(ms(500)); in func1() 33 std::this_thread::sleep_for(ms(500)); in func3() 40 std::this_thread::sleep_for(ms(500)); in func5() 53 assert(f.wait_until(Clock::now() + ms(300)) == std::future_status::timeout); in main() 55 assert(f.wait_until(Clock::now() + ms(300)) == std::future_status::ready); in main() 61 assert(t1-t0 < ms(5)); in main() 69 assert(f.wait_until(Clock::now() + ms(300)) == std::future_status::timeout); in main() 71 assert(f.wait_until(Clock::now() + ms(300)) == std::future_status::ready); in main() 77 assert(t1-t0 < ms(5)); in main() [all …]
|
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/thread/futures/futures.unique_future/ |
D | wait_for.pass.cpp | 21 typedef std::chrono::milliseconds ms; typedef 25 std::this_thread::sleep_for(ms(500)); in func1() 33 std::this_thread::sleep_for(ms(500)); in func3() 40 std::this_thread::sleep_for(ms(500)); in func5() 53 assert(f.wait_for(ms(300)) == std::future_status::timeout); in main() 55 assert(f.wait_for(ms(300)) == std::future_status::ready); in main() 61 assert(t1-t0 < ms(50)); in main() 69 assert(f.wait_for(ms(300)) == std::future_status::timeout); in main() 71 assert(f.wait_for(ms(300)) == std::future_status::ready); in main() 77 assert(t1-t0 < ms(50)); in main() [all …]
|
D | wait_until.pass.cpp | 21 typedef std::chrono::milliseconds ms; typedef 25 std::this_thread::sleep_for(ms(500)); in func1() 33 std::this_thread::sleep_for(ms(500)); in func3() 40 std::this_thread::sleep_for(ms(500)); in func5() 53 assert(f.wait_until(Clock::now() + ms(300)) == std::future_status::timeout); in main() 55 assert(f.wait_until(Clock::now() + ms(300)) == std::future_status::ready); in main() 61 assert(t1-t0 < ms(5)); in main() 69 assert(f.wait_until(Clock::now() + ms(300)) == std::future_status::timeout); in main() 71 assert(f.wait_until(Clock::now() + ms(300)) == std::future_status::ready); in main() 77 assert(t1-t0 < ms(5)); in main() [all …]
|
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/ |
D | mutex_duration.pass.cpp | 30 typedef std::chrono::milliseconds ms; typedef 36 std::shared_lock<std::shared_timed_mutex> lk(m, ms(300)); in f1() 39 ns d = t1 - t0 - ms(250); in f1() 40 assert(d < ms(50)); // within 50ms in f1() 46 std::shared_lock<std::shared_timed_mutex> lk(m, ms(250)); in f2() 49 ns d = t1 - t0 - ms(250); in f2() 50 assert(d < ms(50)); // within 50ms in f2() 63 std::this_thread::sleep_for(ms(250)); in main() 73 std::this_thread::sleep_for(ms(300)); in main()
|
D | mutex_time_point.pass.cpp | 30 typedef std::chrono::milliseconds ms; typedef 36 std::shared_lock<std::shared_timed_mutex> lk(m, Clock::now() + ms(300)); in f1() 39 ns d = t1 - t0 - ms(250); in f1() 46 std::shared_lock<std::shared_timed_mutex> lk(m, Clock::now() + ms(250)); in f2() 49 ns d = t1 - t0 - ms(250); in f2() 50 assert(d < ms(50)); // within 50ms in f2() 63 std::this_thread::sleep_for(ms(250)); in main() 73 std::this_thread::sleep_for(ms(300)); in main()
|
D | mutex.pass.cpp | 29 typedef std::chrono::milliseconds ms; typedef 40 ns d = t1 - t0 - ms(250); in f() 41 assert(d < ms(50)); // within 50ms in f() 53 assert(d < ms(50)); // within 50ms in g() 65 std::this_thread::sleep_for(ms(250)); in main() 73 std::this_thread::sleep_for(ms(250)); in main()
|
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/ |
D | try_lock_for.pass.cpp | 22 typedef std::chrono::milliseconds ms; typedef 29 assert(rel_time == ms(5)); in try_lock_for() 41 assert(lk.try_lock_for(ms(5)) == true); in main() 46 lk.try_lock_for(ms(5)); in main() 54 assert(lk.try_lock_for(ms(5)) == false); in main() 60 lk.try_lock_for(ms(5)); in main()
|
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/ |
D | try_lock_for.pass.cpp | 24 typedef std::chrono::milliseconds ms; typedef 31 assert(rel_time == ms(5)); in try_lock_shared_for() 46 assert(lk.try_lock_for(ms(5)) == true); in main() 51 lk.try_lock_for(ms(5)); in main() 59 assert(lk.try_lock_for(ms(5)) == false); in main() 65 lk.try_lock_for(ms(5)); in main()
|
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/time/time.duration/time.duration.cons/ |
D | convert_exact.pass.cpp | 25 std::chrono::milliseconds ms(1); in main() local 26 std::chrono::microseconds us = ms; in main() 31 constexpr std::chrono::milliseconds ms(1); in main() local 32 constexpr std::chrono::microseconds us = ms; in main()
|
D | convert_inexact.pass.cpp | 26 std::chrono::duration<double, std::milli> ms = us; in main() local 27 assert(ms.count() == 1./1000); in main() 32 constexpr std::chrono::duration<double, std::milli> ms = us; in main() local 33 static_assert(ms.count() == 1./1000, ""); in main()
|
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/time/time.duration/time.duration.literals/ |
D | literals1.pass.cpp | 33 milliseconds ms = 247ms; in main() local 34 assert ( ms == milliseconds(247)); in main() 35 auto ms2 = 247.0ms; in main() 36 assert ( ms == ms2 ); in main()
|
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.threads/thread.thread.this/ |
D | sleep_until.pass.cpp | 24 std::chrono::milliseconds ms(500); in main() local 26 std::this_thread::sleep_until(t0 + ms); in main() 28 std::chrono::nanoseconds ns = (t1 - t0) - ms; in main() 29 std::chrono::nanoseconds err = 5 * ms / 100; in main()
|