Home
last modified time | relevance | path

Searched refs:ms (Results 1 – 25 of 63) sorted by relevance

123

/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/thread/futures/futures.async/
Dasync.pass.cpp25 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/
Dtry_lock_for.pass.cpp27 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()
Dtry_lock_until.pass.cpp27 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/
Dtry_lock_until.pass.cpp27 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()
Dtry_lock_for.pass.cpp27 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/
Dtry_lock_until.pass.cpp29 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()
Dtry_lock_for.pass.cpp29 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()
Dtry_lock_shared_for.pass.cpp30 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()
Dtry_lock_shared_until.pass.cpp30 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()
Dlock_shared.pass.cpp29 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/
Dmutex_duration.pass.cpp27 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()
Dmutex_time_point.pass.cpp27 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/
Dwait_for.pass.cpp21 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 …]
Dwait_until.pass.cpp21 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/
Dwait_for.pass.cpp21 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 …]
Dwait_until.pass.cpp21 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/
Dmutex_duration.pass.cpp30 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()
Dmutex_time_point.pass.cpp30 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()
Dmutex.pass.cpp29 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/
Dtry_lock_for.pass.cpp22 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/
Dtry_lock_for.pass.cpp24 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/
Dconvert_exact.pass.cpp25 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()
Dconvert_inexact.pass.cpp26 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/
Dliterals1.pass.cpp33 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/
Dsleep_until.pass.cpp24 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()

123