Home
last modified time | relevance | path

Searched refs:time (Results 1 - 25 of 80) sorted by relevance

1234

/commonlibrary/rust/ylong_runtime/ylong_runtime/examples/
H A Dylong_timer_latency.rs16 use std::time::{Duration, Instant};
24 ylong_runtime::time::sleep(duration).await; in main()
34 let time = ylong_runtime::block_on(handler).unwrap(); in main()
35 average += time; in main()
46 tokio::time::sleep(duration).await; in main()
56 let time = runtime.block_on(handler).unwrap(); in main()
57 average += time; in main()
H A Dylong_runtime_timer_memory.rs14 use std::time::Duration;
23 ylong_runtime::time::sleep(Duration::from_secs_f32(0.5)).await;
24 ylong_runtime::time::sleep(Duration::from_secs_f32(30.0)).await;
32 ylong_runtime::time::timeout(Duration::from_secs(1), read_big_data()).await
39 ylong_runtime::time::sleep(Duration::from_secs_f32(0.1)).await;
H A Dylong_timer_out_of_context.rs17 use std::time::Duration;
22 ylong_runtime::time::sleep(Duration::from_secs(1)); in main()
H A Dylong_runtime_spawn_fail.rs17 use std::time::Duration;
24 ylong_runtime::time::sleep(Duration::from_secs(100)).await; in main()
H A Dylong_runtime_task_starvation.rs18 use std::time::Duration;
20 use tokio::time::Instant;
39 println!("time cost: {}", time_cost); in main()
H A Dylong_runtime_timer_sleep.rs16 use std::time::{Duration, Instant};
19 #[cfg(feature = "time")]
20 use ylong_runtime::time::sleep;
H A Dylong_runtime_short_block.rs17 use std::time::Duration;
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/time/
H A Dtimer.rs17 use std::time::{Duration, Instant};
20 use crate::time::sleep::{sleep_until, Sleep};
30 /// use std::time::Duration;
32 /// use ylong_runtime::time;
35 /// let mut timer = time::timer(Duration::from_millis(10));
57 /// use std::time::{Duration, Instant};
59 /// use ylong_runtime::time;
62 /// let mut timer = time::timer_at(
89 /// use std::time::{Duration, Instant};
91 /// use ylong_runtime::{block_on, spawn, time};
[all...]
H A Dtimeout.rs17 use std::time::Duration;
19 use crate::time::error::TimerError;
20 use crate::time::sleep;
21 use crate::time::sleep::Sleep;
35 /// use std::time::Duration;
37 /// use ylong_runtime::time::timeout;
90 use std::time::Duration;
92 use crate::time::timeout;
H A Ddriver.rs20 use std::time::{Duration, Instant};
22 use crate::time::wheel::{TimeOut, Wheel};
23 use crate::time::Clock;
93 .expect("driver's start time is later than the current time")
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/executor/
H A Ddriver.rs15 use std::time::Duration;
20 use crate::time::TimeDriver;
44 #[cfg(feature = "time")]
45 time: Arc<TimeDriver>,
52 #[cfg(feature = "time")]
57 #[cfg(feature = "time")]
58 time: time_handle,
67 #[cfg(feature = "time")]
68 time: time_driver,
75 #[cfg(feature = "time")]
[all...]
H A Ddriver_handle.rs24 use crate::time::{Clock, TimeHandle};
25 use std::time::Instant;
42 #[cfg(feature = "time")]
43 pub(crate) time: TimeHandle,
52 #[cfg(any(feature = "net", feature = "time"))]
85 #[cfg(feature = "time")]
88 self.time.start_time()
92 let res = self.time.timer_register(clock_entry);
98 self.time.timer_cancel(clock_entry);
/commonlibrary/rust/ylong_runtime/ylong_runtime/tests/
H A Dspawn_blocking.rs19 use std::time;
30 sleep(time::Duration::from_millis(1)); in ffrt_spawn_blocking_test()
44 sleep(time::Duration::from_millis(1)); in ffrt_spawn_blocking_test()
59 use std::time;
71 sleep(time::Duration::from_millis(1)); in test_spawn()
83 sleep(time::Duration::from_millis(1)); in test_spawn()
97 sleep(time::Duration::from_millis(1)); in test_spawn()
H A Dmutex.rs15 //! requiring to initialize time driver by `driver::Driver::get_mut_driver()`.
22 #![cfg(all(feature = "sync", feature = "time"))]
26 use std::time::Duration;
29 use ylong_runtime::time;
36 /// obtaining it to hold the lock for a long time.
48 time::sleep(Duration::new(1, 5000)).await; in sdv_mutex_lock_hold_longtime()
H A Dblock_on.rs76 use std::time; in sdv_block_on_nest_spawn_spawn_blocking()
85 sleep(time::Duration::from_secs(1)); in sdv_block_on_nest_spawn_spawn_blocking()
104 use std::time; in sdv_block_on_nest_spawn_and_spawn()
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()
147 use std::time; in sdv_block_on_nest_spawn_nest_spawn()
163 sleep(time::Duration::from_secs(1)); in sdv_block_on_nest_spawn_nest_spawn()
256 // at the same time when stealing, which causes the fetching task to be empty,
H A Dtimer_test.rs14 #![cfg(all(feature = "time", feature = "sync"))]
19 use std::time::{Duration, Instant};
21 use ylong_runtime::time::{sleep, sleep_until, Sleep};
52 /// SDV test cases for multi time create.
84 use ylong_runtime::time::timeout; in sdv_block_on_timeout()
H A Djoin_set.rs20 #[cfg(feature = "time")]
21 use std::time::Duration;
23 #[cfg(feature = "time")]
26 #[cfg(feature = "time")]
27 use ylong_runtime::time::sleep;
183 /// 2. Spawn a task that sleeps a very long time.
187 #[cfg(feature = "time")]
210 /// 2. Spawn 100 tasks that sleep a very long time.
215 #[cfg(feature = "time")]
263 /// 2. Spawn 100 tasks that sleep a very long time
[all...]
H A Dtask_cancel.rs14 #![cfg(feature = "time")]
19 use std::time::Duration;
22 use ylong_runtime::time::sleep;
89 /// 1. In a loop, create a long-time task and then cancel it.
H A Dsingleton_runtime.rs16 #[cfg(feature = "time")]
17 use ylong_runtime::time;
121 /// SDV test cases for blocking on a time sleep without initializing the
125 /// 1. Construct a future that calls time::sleep.
128 #[cfg(feature = "time")]
132 time::sleep(std::time::Duration::from_millis(10)).await; in sdv_global_block_on()
/commonlibrary/rust/ylong_http/ylong_http_client/src/async_impl/dns/
H A Dhappy_eyeballs.rs16 use core::time::Duration;
145 .and_then(|time| time.checked_div(preferred_size as u32)),
160 .and_then(|time| time.checked_div(preferred_size as u32)),
162 // TODO Is it necessary to subtract the delay time
168 .and_then(|time| time.checked_div(second_size as u32)),
255 use std::time::{Duration, Instant};
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/sync/mpsc/bounded/
H A Dmod.rs27 use crate::time::timeout;
28 use std::time::Duration;
188 /// of time.
190 /// If the receiver has been closed or the time limit has been passed, this
196 /// * `Err(SendError::TimeOut(T))` if time limit has been passed.
201 /// use std::time::Duration;
216 #[cfg(feature = "time")]
217 pub async fn send_timeout(&self, value: T, time: Duration) -> Result<(), SendTimeoutError<T>> {
218 match timeout(time, self.channel.get_position()).await {
444 /// limited amount of time
[all...]
/commonlibrary/memory_utils/libsync/src/
H A Dsync.c20 int SyncWait(int num, int time) in SyncWait() argument
34 result = poll(&work, 1, time); in SyncWait()
/commonlibrary/rust/ylong_runtime/ylong_io/src/sys/unix/
H A Depoll.rs17 use std::time::Duration;
53 /// Waits for io events to come within a time limit.
55 // Convert to milliseconds, if input time is none, it means the timeout is -1 in select()
57 let timeout = timeout.map(|time| time.as_millis() as c_int).unwrap_or(-1); in select()
/commonlibrary/memory_utils/libsync/include/
H A Dsync.h18 int SyncWait(int num, int time);
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/sync/mpsc/unbounded/
H A Dmod.rs26 use crate::time::timeout;
27 use std::time::Duration;
324 /// limited amount of time.
337 /// use std::time::Duration;
348 #[cfg(feature = "time")]
349 pub async fn recv_timeout(&mut self, time: Duration) -> Result<T, RecvTimeoutError> {
350 match timeout(time, self.recv()).await {

Completed in 7 milliseconds

1234