/commonlibrary/rust/ylong_runtime/ylong_runtime/examples/ |
H A D | ylong_runtime_timer_memory.rs | 32 ylong_runtime::time::timeout(Duration::from_secs(1), read_big_data()).await 53 std::thread::sleep(Duration::from_secs(3600)); in main()
|
H A D | ylong_timer_out_of_context.rs | 22 ylong_runtime::time::sleep(Duration::from_secs(1)); in main()
|
H A D | ylong_runtime_spawn_fail.rs | 24 ylong_runtime::time::sleep(Duration::from_secs(100)).await; in main()
|
H A D | ylong_runtime_short_block.rs | 22 sleep(Duration::from_secs(1)); in main()
|
H A D | ylong_runtime_create_thread_fail.rs | 26 thread::sleep(Duration::from_secs(1000)); in main()
|
H A D | ylong_runtime_task_starvation.rs | 31 thread::sleep(Duration::from_secs(5)); in main()
|
/commonlibrary/rust/ylong_http/ylong_http_client/src/util/config/ |
H A D | settings.rs | 205 /// let timeout = Timeout::from_secs(9); 207 pub fn from_secs(secs: u64) -> Self { in from_secs() functions 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() 540 /// 1. Creates a `Timeout` by calling `Timeout::from_secs`. 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()
|
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/executor/ |
H A D | blocking_pool.rs | 29 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()
|
H A D | async_pool.rs | 37 const ASYNC_THREAD_QUIT_WAIT_TIME: Duration = Duration::from_secs(3);
|
/commonlibrary/rust/ylong_runtime/ylong_runtime/tests/ |
H A D | block_on.rs | 85 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 D | tcp_test.rs | 138 .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()
|
H A D | task_cancel.rs | 36 sleep(Duration::from_secs(100)).await; in sdv_task_cancel_simple() 97 sleep(Duration::from_secs(1000000)); in sdv_task_cancel_multiple()
|
H A D | timer_test.rs | 88 async move { timeout(Duration::from_secs(2), async move { 1 }).await }, in sdv_block_on_timeout()
|
/commonlibrary/rust/ylong_runtime/ylong_runtime/benches/bin/ |
H A D | ylong_tokio_spawn.rs | 40 sleep(Duration::from_secs(5)); 44 sleep(Duration::from_secs(5)); in task()
|
/commonlibrary/rust/ylong_http/ylong_http_client/tests/ |
H A D | sdv_async_http_client_error.rs | 64 .connect_timeout(Timeout::from_secs(1)) in sdv_err_start_connect_timeout() 123 .request_timeout(Timeout::from_secs(1)) in sdv_err_req_timeout()
|
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/time/ |
H A D | sleep.rs | 21 const TEN_YEARS: Duration = Duration::from_secs(86400 * 365 * 10); 63 /// let sleep = sleep(Duration::from_secs(2)).await; 335 let past = Instant::now().checked_sub(Duration::from_secs(1)).unwrap(); in ut_timer_sleep_zero()
|
H A D | timer.rs | 22 const TEN_YEARS: Duration = Duration::from_secs(86400 * 365 * 10);
|
H A D | wheel.rs | 469 sleep(Duration::from_secs(1)).await; in ut_sleep_drop() 480 timeout(Duration::from_secs(2), receiver.recv_from(&mut buf[..])) in ut_sleep_drop()
|
/commonlibrary/rust/ylong_http/ylong_http_client/src/sync_impl/ |
H A D | reader.rs | 142 if now.duration_since(last) >= Duration::from_secs(1) { in read_all()
|
/commonlibrary/rust/ylong_http/ylong_http_client/tests/tcp_server/ |
H A D | mod.rs | 186 stream.set_read_timeout(Some(Duration::from_secs(10))).expect("tcp stream set read time out error !"); 187 stream.set_write_timeout(Some(Duration::from_secs(10))).expect("tcp stream set write time out error !");
|
/commonlibrary/rust/ylong_http/ylong_http_client/src/util/ |
H A D | alt_svc.rs | 94 lifetime: Instant::now().checked_add(Duration::from_secs(seconds))?, in parse_alt_svc()
|
/commonlibrary/rust/ylong_runtime/ylong_io/src/sys/unix/tcp/ |
H A D | socket.rs | 135 Some(Duration::from_secs(linger.l_linger as u64)) in from_linger()
|
/commonlibrary/rust/ylong_runtime/ylong_io/src/sys/windows/tcp/ |
H A D | socket.rs | 164 Some(Duration::from_secs(linger.l_linger as u64)) in from_linger()
|
/commonlibrary/rust/ylong_http/ylong_http_client/src/async_impl/dns/ |
H A D | happy_eyeballs.rs | 348 Duration::from_secs(1), in ut_happy_eyeballs_connect()
|