Home
last modified time | relevance | path

Searched refs:from_secs (Results 1 - 24 of 24) sorted by relevance

/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
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_spawn_fail.rs24 ylong_runtime::time::sleep(Duration::from_secs(100)).await; in main()
H A Dylong_runtime_short_block.rs22 sleep(Duration::from_secs(1)); 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()
/commonlibrary/rust/ylong_http/ylong_http_client/src/util/config/
H A Dsettings.rs205 /// 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 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()
H A Dasync_pool.rs37 const ASYNC_THREAD_QUIT_WAIT_TIME: Duration = Duration::from_secs(3);
/commonlibrary/rust/ylong_runtime/ylong_runtime/tests/
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 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()
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 Dtimer_test.rs88 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 Dylong_tokio_spawn.rs40 sleep(Duration::from_secs(5));
44 sleep(Duration::from_secs(5)); in task()
/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()
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/time/
H A Dsleep.rs21 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 Dtimer.rs22 const TEN_YEARS: Duration = Duration::from_secs(86400 * 365 * 10);
H A Dwheel.rs469 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 Dreader.rs142 if now.duration_since(last) >= Duration::from_secs(1) { in read_all()
/commonlibrary/rust/ylong_http/ylong_http_client/tests/tcp_server/
H A Dmod.rs186 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 Dalt_svc.rs94 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 Dsocket.rs135 Some(Duration::from_secs(linger.l_linger as u64)) in from_linger()
/commonlibrary/rust/ylong_runtime/ylong_io/src/sys/windows/tcp/
H A Dsocket.rs164 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 Dhappy_eyeballs.rs348 Duration::from_secs(1), in ut_happy_eyeballs_connect()

Completed in 12 milliseconds