/commonlibrary/rust/ylong_runtime/ylong_runtime/examples/ |
H A D | ylong_runtime_timer_sleep.rs | 27 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 D | ylong_timer_latency.rs | 23 let start = Instant::now(); in main() 45 let start = Instant::now(); in main()
|
H A D | ylong_runtime_signal.rs | 77 let start = Instant::now(); in main() 81 let end = Instant::now(); in main()
|
H A D | ylong_runtime_task_starvation.rs | 29 let instant = Instant::now(); in main()
|
/commonlibrary/rust/ylong_runtime/ylong_runtime/benches/bin/ |
H A D | ylong_sync_rwlock_perf.rs | 25 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 D | ylong_sync_mutex_perf.rs | 25 let start = Instant::now(); in main() 30 let end = Instant::now(); in main()
|
H A D | ylong_runtime_tcp_client_perf.rs | 31 let start = Instant::now(); in main() 43 let end = Instant::now(); in main()
|
H A D | ylong_runtime_tcp_server_perf.rs | 39 let start = Instant::now(); in main() 52 println!("Server now break"); in main() 56 let end = Instant::now(); in main()
|
H A D | ylong_tokio_tcp_perf.rs | 109 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 D | reader.rs | 119 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 D | driver.rs | 38 start_time: Instant::now(), 90 let now = Instant::now(); 91 let now = now 107 match lock.poll(now) {
|
H A D | wheel.rs | 273 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 D | timer.rs | 48 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 D | sleep.rs | 46 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 D | timer_event_handler.cpp | 54 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 D | datetime_ex.cpp | 29 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 D | concurrent_helper.h | 77 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 D | error_helper.h | 151 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 D | mod.rs | 208 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 D | utils_safe_queue_test.cpp | 167 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 D | utils_safe_map_test.cpp | 251 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 D | safe_queue_benchmark_test.cpp | 262 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 D | alt_svc.rs | 48 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 D | process_helper.cpp | 452 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 D | timer_test.rs | 71 let handle = ylong_runtime::spawn(async move { sleep_until(Instant::now()) }); in sdv_sleep_drop_out_context()
|