Home
last modified time | relevance | path

Searched refs:from_secs (Results 1 – 25 of 49) sorted by relevance

12

/ohos5.0/foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk/rust/tests/
H A Dbasic.rs27 std::thread::sleep(std::time::Duration::from_secs(20)); in init()
29 std::thread::sleep(std::time::Duration::from_secs(20)); in init()
49 std::thread::sleep(std::time::Duration::from_secs(5)); in reason()
54 std::thread::sleep(std::time::Duration::from_secs(5)); in reason()
59 std::thread::sleep(std::time::Duration::from_secs(5)); in reason()
64 std::thread::sleep(std::time::Duration::from_secs(5)); in reason()
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http_client/src/util/config/
H A Dsettings.rs207 pub fn from_secs(secs: u64) -> Self { in from_secs() method
208 Self(Some(Duration::from_secs(secs))) in from_secs()
269 self.min = (cmp::min(self.max, min), Duration::from_secs(secs)); in min_speed()
545 let timeout = Timeout::from_secs(5); in ut_timeout_clone()
583 assert_eq!(speed.min, (1024, Duration::from_secs(12))) in ut_speed_limit_min_speed()
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/tests/
H A Djoin_set.rs194 sleep(Duration::from_secs(100000)).await; in sdv_join_set_cancel_one()
222 sleep(Duration::from_secs(10000)).await; in sdv_join_set_cancel_all()
274 sleep(Duration::from_secs(100000)).await; in sdv_join_set_shutdown()
297 sleep(Duration::from_secs(100000)).await; in sdv_join_set_drop()
H A Dblock_on.rs85 sleep(time::Duration::from_secs(1)); in sdv_block_on_nest_spawn_spawn_blocking()
115 sleep(time::Duration::from_secs(1)); in sdv_block_on_nest_spawn_and_spawn()
128 sleep(time::Duration::from_secs(1)); in sdv_block_on_nest_spawn_and_spawn()
163 sleep(time::Duration::from_secs(1)); in sdv_block_on_nest_spawn_nest_spawn()
H A Dtask_cancel.rs36 sleep(Duration::from_secs(100)).await; in sdv_task_cancel_simple()
97 sleep(Duration::from_secs(1000000)); in sdv_task_cancel_multiple()
H A Dtcp_test.rs138 .set_linger(Some(std::time::Duration::from_secs(1))) in sdv_tcp_stream_basic()
142 Some(std::time::Duration::from_secs(1)) in sdv_tcp_stream_basic()
472 sleep(Duration::from_secs(10000)).await; in sdv_tcp_cancel()
486 sleep(Duration::from_secs(100000)).await; in sdv_tcp_cancel()
494 sleep(Duration::from_secs(10000)).await; in sdv_tcp_cancel()
581 ylong_runtime::time::sleep(std::time::Duration::from_secs(10)).await; in sdv_tcp_unexpected_eof()
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/examples/
H A Dylong_runtime_timer_memory.rs32 ylong_runtime::time::timeout(Duration::from_secs(1), read_big_data()).await in run_forever()
53 std::thread::sleep(Duration::from_secs(3600)); in main()
H A Dylong_timer_out_of_context.rs22 ylong_runtime::time::sleep(Duration::from_secs(1)); in main()
H A Dylong_runtime_short_block.rs22 sleep(Duration::from_secs(1)); in main()
H A Dylong_runtime_spawn_fail.rs24 ylong_runtime::time::sleep(Duration::from_secs(100)).await; in main()
H A Dylong_runtime_create_thread_fail.rs26 thread::sleep(Duration::from_secs(1000)); in main()
H A Dylong_runtime_task_starvation.rs31 thread::sleep(Duration::from_secs(5)); in main()
/ohos5.0/base/request/request/services/examples/
H A Drun_count.rs45 std::thread::sleep(std::time::Duration::from_secs(1)); in main()
52 std::thread::sleep(std::time::Duration::from_secs(30000)); in main()
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/executor/
H A Dblocking_pool.rs29 pub(crate) const BLOCKING_THREAD_QUIT_WAIT_TIME: Duration = Duration::from_secs(1);
104 const BLOCKING_THREAD_KEEP_ALIVE_TIME: Duration = Duration::from_secs(5);
424 RuntimeBuilder::new_multi_thread().keep_alive_time(Duration::from_secs(1)); in ut_blocking_pool_new()
459 assert!(!blocking_pool.shutdown(Duration::from_secs(3))); in ut_blocking_pool_shutdown()
468 assert!(blocking_pool.shutdown(Duration::from_secs(3))); in ut_blocking_pool_shutdown()
478 assert!(!blocking_pool.shutdown(Duration::from_secs(0))); in ut_blocking_pool_shutdown()
/ohos5.0/base/request/request/services/tests/
H A Dresume.rs38 std::thread::sleep(std::time::Duration::from_secs(1)); in sdv_start_resume()
49 ylong_runtime::time::sleep(Duration::from_secs(1)).await; in sdv_start_resume()
H A Dstart.rs46 ylong_runtime::time::sleep(Duration::from_secs(1)).await; in sdv_start_basic()
/ohos5.0/foundation/communication/netstack/interfaces/innerkits/rust/ylong_http_client/src/reqwest_impl/
H A Dconfig.rs56 pub fn from_secs(secs: u64) -> Self { in from_secs() method
57 Self(Some(Duration::from_secs(secs))) in from_secs()
111 self.min = (cmp::min(self.max, min), Duration::from_secs(duration)); in min_speed()
/ohos5.0/commonlibrary/rust/ylong_runtime/docs/
H A Duser_guide.md24 .keep_alive_time(std::time::Duration::from_secs(10))
87 sleep(Duration::from_secs(100)).await;
146 let result = timeout(Duration::from_millis(100), sleep(Duration::from_secs(1)));
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/benches/bin/
H A Dylong_tokio_spawn.rs40 sleep(Duration::from_secs(5)); in async_task()
44 sleep(Duration::from_secs(5)); in task()
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http_client/tests/
H A Dsdv_async_http_client_error.rs64 .connect_timeout(Timeout::from_secs(1)) in sdv_err_start_connect_timeout()
123 .request_timeout(Timeout::from_secs(1)) in sdv_err_req_timeout()
/ohos5.0/base/request/request/services/src/manage/events/
H A Dmod.rs293 std::thread::sleep(time::Duration::from_secs(10)); in ut_task_manager_start()
320 std::thread::sleep(time::Duration::from_secs(20)); in ut_task_manager_pause_resume()
347 std::thread::sleep(time::Duration::from_secs(20)); in ut_task_manager_stop_resume()
/ohos5.0/base/request/request/services/src/manage/
H A Dtask_manager.rs434 sleep(Duration::from_secs(RESTORE_ALL_TASKS_INTERVAL)).await; in restore_all_tasks()
440 sleep(Duration::from_secs(CLEAR_INTERVAL)).await; in clear_timeout_tasks()
447 sleep(Duration::from_secs(LOG_INTERVAL)).await; in log_all_task_info()
/ohos5.0/base/request/request/services/src/task/
H A Dclient.rs37 .connect_timeout(Timeout::from_secs(CONNECT_TIMEOUT)) in build_client()
38 .request_timeout(Timeout::from_secs(SECONDS_IN_ONE_WEEK)) in build_client()
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/builder/
H A Dmod.rs380 let keep_alive_time = Duration::from_secs(0); in ut_thread_pool_builder_keep_alive_time()
388 let keep_alive_time = Duration::from_secs(1); in ut_thread_pool_builder_keep_alive_time()
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/time/
H A Dsleep.rs21 const TEN_YEARS: Duration = Duration::from_secs(86400 * 365 * 10);
335 let past = Instant::now().checked_sub(Duration::from_secs(1)).unwrap(); in ut_timer_sleep_zero()

12