Home
last modified time | relevance | path

Searched refs:now (Results 1 - 25 of 36) sorted by relevance

12

/commonlibrary/rust/ylong_runtime/ylong_runtime/examples/
H A Dylong_runtime_timer_sleep.rs27 let start = Instant::now(); in main()
29 println!("{:?}", Instant::now() - start); in main()
32 let start = Instant::now(); in main()
34 println!("{:?}", Instant::now() - start); in main()
37 let start = Instant::now(); in main()
39 println!("{:?}", Instant::now() - start); in main()
48 let start = Instant::now(); in main()
52 println!("{:?}", Instant::now() - start); in main()
H A Dylong_timer_latency.rs23 let start = Instant::now(); in main()
45 let start = Instant::now(); in main()
H A Dylong_runtime_signal.rs77 let start = Instant::now(); in main()
81 let end = Instant::now(); in main()
H A Dylong_runtime_task_starvation.rs29 let instant = Instant::now(); in main()
/commonlibrary/rust/ylong_runtime/ylong_runtime/benches/bin/
H A Dylong_sync_rwlock_perf.rs25 let start = Instant::now(); in main()
33 let end = Instant::now(); in main()
36 let start = Instant::now(); in main()
41 let end = Instant::now(); in main()
H A Dylong_sync_mutex_perf.rs25 let start = Instant::now(); in main()
30 let end = Instant::now(); in main()
H A Dylong_runtime_tcp_client_perf.rs31 let start = Instant::now(); in main()
43 let end = Instant::now(); in main()
H A Dylong_runtime_tcp_server_perf.rs39 let start = Instant::now(); in main()
52 println!("Server now break"); in main()
56 let end = Instant::now(); in main()
H A Dylong_tokio_tcp_perf.rs109 let st = Instant::now(); in main()
153 let st = Instant::now(); in main()
/commonlibrary/rust/ylong_http/ylong_http_client/src/sync_impl/
H A Dreader.rs119 let mut last = Instant::now(); in read_all()
141 let now = Instant::now(); in read_all()
142 if now.duration_since(last) >= Duration::from_secs(1) { in read_all()
147 last = now; in read_all()
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/time/
H A Ddriver.rs38 start_time: Instant::now(),
90 let now = Instant::now();
91 let now = now
107 match lock.poll(now) {
H A Dwheel.rs273 pub(crate) fn poll(&mut self, now: u64) -> TimeOut {
282 Some(ref expiration) if expiration.deadline > now => {
283 return TimeOut::Duration(Duration::from_millis(expiration.deadline - now))
290 self.set_elapsed(now);
375 pub(crate) fn next_expiration(&self, now: u64) -> Option<Expiration> {
376 let slot = self.next_occupied_slot(now)?;
378 let deadline = Self::calculate_deadline(slot, self.level, now);
387 fn calculate_deadline(slot: usize, level: usize, now: u64) -> u64 { in calculate_deadline()
390 let level_start = now & !(level_range - 1); in calculate_deadline()
394 if deadline <= now { in calculate_deadline()
[all...]
H A Dtimer.rs48 timer_at(Instant::now(), period) in timer()
63 /// Instant::now() + Duration::from_millis(10),
158 /// Resets Timer from now on.
160 self.start.as_mut().reset(Instant::now() + self.period); in reset()
203 Instant::now() + Duration::new(0, 20_000_000), in ut_new_timer_base()
228 Instant::now() + Duration::from_millis(100), in ut_new_timer_timeout()
H A Dsleep.rs46 match Instant::now().checked_add(duration) { in sleep()
48 None => Sleep::new_timeout(Instant::now() + TEN_YEARS), in sleep()
140 if let Some(duration) = this.deadline.checked_duration_since(Instant::now()) {
335 let past = Instant::now().checked_sub(Duration::from_secs(1)).unwrap(); in ut_timer_sleep_zero()
/commonlibrary/c_utils/base/src/
H A Dtimer_event_handler.cpp54 timespec now{0, 0}; in Initialize()
55 if (clock_gettime(CLOCK_MONOTONIC, &now) == -1) { in Initialize()
60 // next time out time is now + interval in Initialize()
61 newValue.it_value.tv_sec = now.tv_sec + interval_ / MILLI_TO_BASE; in Initialize()
62 newValue.it_value.tv_nsec = now.tv_nsec + (interval_ % MILLI_TO_BASE) * MILLI_TO_NANO; in Initialize()
H A Ddatetime_ex.cpp29 time_point<system_clock, secondtype> totalSeconds = time_point_cast<secondtype>(system_clock::now()); in GetSecondsSince1970ToNow()
58 time_point<system_clock, dayType> totalDays = time_point_cast<dayType>(system_clock::now()); in GetDaysSince1970ToNow()
68 auto tt = system_clock::to_time_t(system_clock::now()); in GetSystemCurrentTime()
76 auto t1 = system_clock::to_time_t(system_clock::now()); in GetLocalTimeZone()
/commonlibrary/ets_utils/js_concurrent_module/common/helper/
H A Dconcurrent_helper.h77 auto now = std::chrono::system_clock::now(); in GetMilliseconds() local
78 auto millisecs = std::chrono::duration_cast<std::chrono::milliseconds>(now.time_since_epoch()); in GetMilliseconds()
H A Derror_helper.h151 auto now = std::chrono::system_clock::now(); in GetCurrentTimeStamp() local
152 std::time_t currentTimeStamp = std::chrono::system_clock::to_time_t(now); in GetCurrentTimeStamp()
/commonlibrary/rust/ylong_http/ylong_http_client/src/async_impl/downloader/
H A Dmod.rs208 let now = Instant::now(); in check_timeout()
209 if now.duration_since(self.info.as_mut().unwrap().start_time) >= timeout { in check_timeout()
233 start_time: Instant::now(), in new()
/commonlibrary/c_utils/base/test/unittest/common/
H A Dutils_safe_queue_test.cpp167 std::time_t timeT = system_clock::to_time_t(system_clock::now()); in HWTEST_F()
212 std::time_t timeT = system_clock::to_time_t(system_clock::now()); in HWTEST_F()
252 std::time_t timeT = system_clock::to_time_t(system_clock::now()); in HWTEST_F()
H A Dutils_safe_map_test.cpp251 std::time_t timeT = system_clock::to_time_t(system_clock::now()); in HWTEST_F()
294 std::time_t timeT = system_clock::to_time_t(system_clock::now()); in HWTEST_F()
344 std::time_t timeT = system_clock::to_time_t(system_clock::now()); in HWTEST_F()
432 std::time_t timeT = system_clock::to_time_t(system_clock::now()); in HWTEST_F()
/commonlibrary/c_utils/base/test/benchmarktest/safe_queue_benchmark_test/
H A Dsafe_queue_benchmark_test.cpp262 std::time_t timeT = system_clock::to_time_t(system_clock::now()); in BENCHMARK_F()
309 std::time_t timeT = system_clock::to_time_t(system_clock::now()); in BENCHMARK_F()
352 std::time_t timeT = system_clock::to_time_t(system_clock::now()); in BENCHMARK_F()
408 std::time_t timeT = system_clock::to_time_t(system_clock::now()); in BENCHMARK_F()
/commonlibrary/rust/ylong_http/ylong_http_client/src/util/
H A Dalt_svc.rs48 vec.retain(|alt_scv| alt_scv.lifetime >= Instant::now());
81 // only support ma now in parse_alt_svc()
94 lifetime: Instant::now().checked_add(Duration::from_secs(seconds))?, in parse_alt_svc()
/commonlibrary/ets_utils/platform/ios/
H A Dprocess_helper.cpp452 struct timeval now; in GetSysTimer() local
456 gettimeofday(&now, &tz); in GetSysTimer()
461 systimer = now.tv_sec - boottime.tv_sec; in GetSysTimer()
462 systimer += (double)(now.tv_usec - boottime.tv_usec) / MICROSECONDS_OF_SECOND; in GetSysTimer()
/commonlibrary/rust/ylong_runtime/ylong_runtime/tests/
H A Dtimer_test.rs71 let handle = ylong_runtime::spawn(async move { sleep_until(Instant::now()) }); in sdv_sleep_drop_out_context()

Completed in 9 milliseconds

12