/third_party/python/Lib/test/ |
H A D | test_strftime.py | 34 def _update_variables(self, now): 36 self.gmt = time.gmtime(now) 37 now = time.localtime(now) 39 if now[3] < 12: self.ampm='(AM|am)' 42 self.jan1 = time.localtime(time.mktime((now[0], 1, 1, 0, 0, 0, 0, 1, 0))) 45 if now[8]: self.tz = time.tzname[1] 50 if now[3] > 12: self.clock12 = now[3] - 12 51 elif now[ [all...] |
H A D | test_sched.py | 117 now = time.time() 118 event1 = scheduler.enterabs(now + 0.01, 1, fun, (0.01,)) 119 event2 = scheduler.enterabs(now + 0.02, 1, fun, (0.02,)) 120 event3 = scheduler.enterabs(now + 0.03, 1, fun, (0.03,)) 121 event4 = scheduler.enterabs(now + 0.04, 1, fun, (0.04,)) 122 event5 = scheduler.enterabs(now + 0.05, 1, fun, (0.05,)) 134 now = timer.time() 135 event1 = scheduler.enterabs(now + 1, 1, fun, (1,)) 136 event2 = scheduler.enterabs(now + 2, 1, fun, (2,)) 137 event4 = scheduler.enterabs(now [all...] |
/third_party/ltp/testcases/kernel/syscalls/clock_gettime/ |
H A D | leapsec01.c | 37 static const char *strtime(const struct timespec *now) in strtime() argument 41 if (snprintf(fmt, sizeof(fmt), "%%T.%09ld", now->tv_nsec) < 0) { in strtime() 45 if (!strftime(buf, sizeof(buf), fmt, localtime(&now->tv_sec))) { in strtime() 75 struct timespec now; in adjtimex_status() local 80 now.tv_sec = tx->time.tv_sec; in adjtimex_status() 81 now.tv_nsec = tx->time.tv_usec * 1000; in adjtimex_status() 88 tst_res(TINFO, "%s adjtimex: %s", strtime(&now), msgs[ret]); in adjtimex_status() 91 strtime(&now), ret); in adjtimex_status() 96 struct timespec now, target; in test_hrtimer_early_expiration() local 99 SAFE_CLOCK_GETTIME(CLOCK_REALTIME, &now); in test_hrtimer_early_expiration() 125 struct timespec now, leap, start; run_leapsec() local 190 struct timespec now; cleanup() local [all...] |
/third_party/node/deps/cares/src/lib/ |
H A D | ares__timeval.c | 40 struct timeval now; in ares__tvnow() local 42 now.tv_sec = (long)milliseconds / 1000; in ares__tvnow() 43 now.tv_usec = (long)(milliseconds % 1000) * 1000; in ares__tvnow() 44 return now; in ares__tvnow() 58 struct timeval now; in ares__tvnow() local 61 now.tv_sec = tsnow.tv_sec; in ares__tvnow() 62 now.tv_usec = (int)(tsnow.tv_nsec / 1000); in ares__tvnow() 71 (void)gettimeofday(&now, NULL); /* LCOV_EXCL_LINE */ in ares__tvnow() 74 now.tv_sec = (long)time(NULL); in ares__tvnow() 75 now in ares__tvnow() 90 struct timeval now; ares__tvnow() local 102 struct timeval now; ares__tvnow() local [all...] |
H A D | ares_timeout.c | 38 const struct timeval *now, in ares__timeval_remaining() 44 if (tout->tv_sec < now->tv_sec || in ares__timeval_remaining() 45 (tout->tv_sec == now->tv_sec && tout->tv_usec < now->tv_usec)) { in ares__timeval_remaining() 49 remaining->tv_sec = tout->tv_sec - now->tv_sec; in ares__timeval_remaining() 50 if (tout->tv_usec < now->tv_usec) { in ares__timeval_remaining() 52 remaining->tv_usec = (tout->tv_usec + 1000000) - now->tv_usec; in ares__timeval_remaining() 54 remaining->tv_usec = tout->tv_usec - now->tv_usec; in ares__timeval_remaining() 63 struct timeval now; in ares_timeout() local 75 now in ares_timeout() 37 ares__timeval_remaining(struct timeval *remaining, const struct timeval *now, const struct timeval *tout) ares__timeval_remaining() argument [all...] |
H A D | ares_process.c | 57 ares_socket_t read_fd, struct timeval *now); 58 static void process_timeouts(ares_channel_t *channel, struct timeval *now); 62 ares_bool_t tcp, struct timeval *now); 105 /* return true if now is exactly check time or later */ 106 ares_bool_t ares__timedout(const struct timeval *now, in ares__timedout() argument 109 ares_int64_t secs = ((ares_int64_t)now->tv_sec - (ares_int64_t)check->tv_sec); in ares__timedout() 119 return ((ares_int64_t)now->tv_usec - (ares_int64_t)check->tv_usec) >= 0 in ares__timedout() 125 static void timeadd(struct timeval *now, size_t millisecs) in timeadd() argument 127 now->tv_sec += (time_t)millisecs / 1000; in timeadd() 128 now in timeadd() 143 struct timeval now; processfds() local 275 read_tcp_data(ares_channel_t *channel, struct server_connection *conn, struct timeval *now) read_tcp_data() argument 413 read_udp_packets_fd(ares_channel_t *channel, struct server_connection *conn, struct timeval *now) read_udp_packets_fd() argument 478 read_packets(ares_channel_t *channel, fd_set *read_fds, ares_socket_t read_fd, struct timeval *now) read_packets() argument 546 process_timeouts(ares_channel_t *channel, struct timeval *now) process_timeouts() argument 616 process_answer(ares_channel_t *channel, const unsigned char *abuf, size_t alen, struct server_connection *conn, ares_bool_t tcp, struct timeval *now) process_answer() argument 761 ares__requeue_query(struct query *query, struct timeval *now) ares__requeue_query() argument 876 ares__send_query(struct query *query, struct timeval *now) ares__send_query() argument [all...] |
H A D | ares_qcache.c | 131 const struct timeval *now) in ares__qcache_expire() 141 if (entry->expire_ts > now->tv_sec) { in ares__qcache_expire() 152 struct timeval now; in ares__qcache_flush() local 153 memset(&now, 0, sizeof(now)); in ares__qcache_flush() 154 ares__qcache_expire(cache, &now); in ares__qcache_flush() 313 const struct timeval *now) in ares__qcache_insert() 356 entry->expire_ts = now->tv_sec + (time_t)ttl; in ares__qcache_insert() 357 entry->insert_ts = now->tv_sec; in ares__qcache_insert() 389 const struct timeval *now, in ares__qcache_fetch() 130 ares__qcache_expire(ares__qcache_t *cache, const struct timeval *now) ares__qcache_expire() argument 310 ares__qcache_insert(ares__qcache_t *qcache, ares_dns_record_t *dnsrec, const unsigned char *qbuf, size_t qlen, const struct timeval *now) ares__qcache_insert() argument 387 ares__qcache_fetch(ares__qcache_t *qcache, const ares_dns_record_t *dnsrec, const struct timeval *now, unsigned char **buf, size_t *buf_len) ares__qcache_fetch() argument 424 ares_qcache_insert(ares_channel_t *channel, const struct timeval *now, const struct query *query, ares_dns_record_t *dnsrec) ares_qcache_insert() argument 433 ares_qcache_fetch(ares_channel_t *channel, const struct timeval *now, const unsigned char *qbuf, size_t qlen, unsigned char **abuf, size_t *alen) ares_qcache_fetch() argument [all...] |
/third_party/curl/src/ |
H A D | tool_util.c | 39 struct timeval now; in tvnow() local 43 now.tv_sec = (long)(count.QuadPart / tool_freq.QuadPart); in tvnow() 44 now.tv_usec = (long)((count.QuadPart % tool_freq.QuadPart) * 1000000 / in tvnow() 58 now.tv_sec = (long)(milliseconds / 1000); in tvnow() 59 now.tv_usec = (long)((milliseconds % 1000) * 1000); in tvnow() 61 return now; in tvnow() 75 struct timeval now; in tvnow() local 78 now.tv_sec = tsnow.tv_sec; in tvnow() 79 now.tv_usec = (int)(tsnow.tv_nsec / 1000); in tvnow() 88 (void)gettimeofday(&now, NUL in tvnow() 107 struct timeval now; tvnow() local 119 struct timeval now; tvnow() local [all...] |
/third_party/curl/tests/libtest/ |
H A D | testutil.c | 38 struct timeval now; in tutil_tvnow() local 40 now.tv_sec = (long)(milliseconds / 1000); in tutil_tvnow() 41 now.tv_usec = (long)((milliseconds % 1000) * 1000); in tutil_tvnow() 42 return now; in tutil_tvnow() 56 struct timeval now; in tutil_tvnow() local 59 now.tv_sec = tsnow.tv_sec; in tutil_tvnow() 60 now.tv_usec = (int)(tsnow.tv_nsec / 1000); in tutil_tvnow() 69 (void)gettimeofday(&now, NULL); in tutil_tvnow() 72 now.tv_sec = time(NULL); in tutil_tvnow() 73 now in tutil_tvnow() 88 struct timeval now; tutil_tvnow() local 100 struct timeval now; tutil_tvnow() local [all...] |
/third_party/rust/crates/rustix/tests/process/ |
H A D | priority.rs | 34 let now = getpriority_process(None).unwrap(); in test_priorities() 39 assert_eq!(get + 1, now); in test_priorities() 42 let now = getpriority_process(None).unwrap(); in test_priorities() 44 assert!(now >= 19 && now <= 20); in test_priorities() 47 assert_eq!(now, again); in test_priorities() 61 let now = getpriority_process(None).unwrap(); in test_priorities() 62 assert_eq!(start, now); in test_priorities() 66 let now = getpriority_process(None).unwrap(); in test_priorities() 67 assert_eq!(start + 1, now); in test_priorities() [all...] |
/third_party/node/deps/v8/src/base/platform/ |
H A D | elapsed-timer.h | 23 void Start(TimeTicks now) { in Start() argument 24 DCHECK(!now.IsNull()); in Start() 26 set_start_ticks(now); in Start() 62 TimeDelta Restart(TimeTicks now) { in Restart() argument 63 DCHECK(!now.IsNull()); in Restart() 65 TimeDelta elapsed = now - start_ticks_; in Restart() 67 set_start_ticks(now); in Restart() 74 void Pause(TimeTicks now) { in Pause() argument 75 TimeDelta elapsed = Elapsed(now); in Pause() 85 void Resume(TimeTicks now) { in Resume() argument 119 TimeTicks now = TimeTicks::Now(); Now() local [all...] |
/third_party/ltp/lib/newlib_tests/ |
H A D | tst_fuzzy_sync02.c | 106 int now, fin = MAX(b.return_t, bd.return_t); in worker() local 110 for (now = 0; now <= fin; now++) { in worker() 111 if (now == b.critical_s || now == b.critical_t) in worker() 113 if (now == bd.critical_s || now == bd.critical_t) in worker() 129 int now, fin; in run() local 140 for (now in run() [all...] |
/third_party/curl/lib/ |
H A D | timeval.c | 35 struct curltime now; in Curl_now() local 39 now.tv_sec = (time_t)(count.QuadPart / Curl_freq.QuadPart); in Curl_now() 40 now.tv_usec = (int)((count.QuadPart % Curl_freq.QuadPart) * 1000000 / in Curl_now() 54 now.tv_sec = milliseconds / 1000; in Curl_now() 55 now.tv_usec = (milliseconds % 1000) * 1000; in Curl_now() 57 return now; in Curl_now() 73 struct timeval now; in Curl_now() local 119 (void)gettimeofday(&now, NULL); in Curl_now() 120 cnow.tv_sec = now.tv_sec; in Curl_now() 121 cnow.tv_usec = (unsigned int)now in Curl_now() 172 struct timeval now; Curl_now() local 187 struct curltime now; Curl_now() local [all...] |
H A D | psl.c | 51 struct curltime now = Curl_now(); in now_seconds() local 53 return now.tv_sec; in now_seconds() 60 time_t now; in Curl_psl_use() local 66 now = now_seconds(); in Curl_psl_use() 67 if(!pslcache->psl || pslcache->expires <= now) { in Curl_psl_use() 75 now = now_seconds(); in Curl_psl_use() 76 if(!pslcache->psl || pslcache->expires <= now) { in Curl_psl_use() 84 expires = now < TIME_T_MAX - PSL_TTL? now + PSL_TTL: TIME_T_MAX; in Curl_psl_use()
|
/third_party/skia/modules/pathkit/perf/ |
H A D | perfReporter.js | 18 let start = Date.now(); 19 let now = start; 22 while (now - start < 100) { 24 now = Date.now(); 32 // approximate tries in 2s (unless now - start >> 100 ms) 37 start = Date.now(); 42 const end = Date.now(); 67 let start = Date.now(); 68 let now [all...] |
/third_party/libinput/src/ |
H A D | timer.c | 39 void (*timer_func)(uint64_t now, void *timer_func_data), in libinput_timer_init() 97 uint64_t now = libinput_now(timer->libinput); in libinput_timer_set_flags() local 98 if (expire < now) { in libinput_timer_set_flags() 100 now - expire > timer_warning_limit) in libinput_timer_set_flags() 105 us2ms(now - expire)); in libinput_timer_set_flags() 106 } else if ((expire - now) > ms2us(5000)) { in libinput_timer_set_flags() 108 "timer %s: offset more than 5s, now %d expire %d\n", in libinput_timer_set_flags() 110 us2ms(now), us2ms(expire)); in libinput_timer_set_flags() 141 libinput_timer_handler(struct libinput *libinput , uint64_t now) in libinput_timer_handler() argument 150 if (timer->expire <= now) { in libinput_timer_handler() 36 libinput_timer_init(struct libinput_timer *timer, struct libinput *libinput, const char *timer_name, void (*timer_func)(uint64_t now, void *timer_func_data), void *timer_func_data) libinput_timer_init() argument 173 uint64_t now; libinput_timer_dispatch() local 245 libinput_timer_flush(struct libinput *libinput, uint64_t now) libinput_timer_flush() argument [all...] |
/third_party/ltp/testcases/realtime/func/sched_latency/ |
H A D | sched_latency.c | 29 * delay = (now - start - i*period) converted to microseconds 32 * now = CLOCK_MONOTONIC gettime in ns, start = CLOCK_MONOTONIC gettime 123 nsec_t next = 0, now = 0, sched_delta = 0, delta = 0, prev = in periodic_thread() local 129 now = rt_gettime(); in periodic_thread() 130 start_delay = (now - start) / NS_PER_US; in periodic_thread() 131 iter_start = next = now; in periodic_thread() 143 prev = now; in periodic_thread() 144 now = rt_gettime(); in periodic_thread() 146 if (next < now) { in periodic_thread() 157 printf(" now in periodic_thread() [all...] |
/third_party/lwip/src/core/ |
H A D | timeouts.c | 236 u32_t now; in lwip_cyclic_timer() local 245 now = sys_now(); in lwip_cyclic_timer() 247 if (TIME_LESS_THAN(next_timeout_time, now)) { in lwip_cyclic_timer() 250 sys_timeout_abs((u32_t)(now + cyclic->interval_ms), lwip_cyclic_timer, arg, cyclic->handler_name); in lwip_cyclic_timer() 252 sys_timeout_abs((u32_t)(now + cyclic->interval_ms), lwip_cyclic_timer, arg); in lwip_cyclic_timer() 356 u32_t now; in sys_check_timeouts() local 361 now = sys_now(); in sys_check_timeouts() 375 if (TIME_LESS_THAN(now, tmptimeout->time)) { in sys_check_timeouts() 408 u32_t now; in sys_restart_timeouts() local 416 now in sys_restart_timeouts() 430 u32_t now; sys_timeouts_sleeptime() local [all...] |
H A D | lowpower.c | 209 timeout_handler(struct timer_entry *t, u32_t now) in timeout_handler() argument 213 LWIP_DEBUGF(LOWPOWER_DEBUG, ("%s timeout: now:%u\n", t->name, now)); in timeout_handler() 218 LWIP_UNUSED_ARG(now); in timeout_handler() 268 get_sleep_time(u32_t now) in get_sleep_time() argument 290 t->timeout = now; in get_sleep_time() 295 if (temp <= now - t->timeout) { in get_sleep_time() 301 timeout_handler(t, now); in get_sleep_time() 305 temp = temp - (now - t->timeout); in get_sleep_time() 310 LWIP_DEBUGF(LOWPOWER_DEBUG, ("msec = %u now in get_sleep_time() 315 check_timeout(u32_t now) check_timeout() argument 358 u32_t now; tcpip_timeouts_mbox_fetch() local [all...] |
/third_party/node/test/sequential/ |
H A D | test-perf-hooks.js | 6 const testStartTime = performance.now(); 25 // performance.timeOrigin and performance.now() are in reasonable range. 28 const uptime1 = Date.now() - performance.timeOrigin; 29 const uptime2 = performance.now(); 32 `Date.now() - performance.timeOrigin (${uptime1}) - ` + 33 `performance.now() (${uptime2}) = ` + 36 `Date.now() - performance.timeOrigin (${uptime1}) - ` + 91 // Calculate the difference between now() and duration as soon as possible. 92 const now = performance.now(); [all...] |
/third_party/jerryscript/jerry-port/default/ |
H A D | default-date.c | 66 time_t now = (time_t) (unix_ms / 1000); in jerry_port_get_local_time_zone_adjustment() local 67 localtime_r (&now, &tm); in jerry_port_get_local_time_zone_adjustment() 70 now -= tm.tm_gmtoff; in jerry_port_get_local_time_zone_adjustment() 71 localtime_r (&now, &tm); in jerry_port_get_local_time_zone_adjustment() 77 time_t now = (time_t) (unix_ms / 1000); in jerry_port_get_local_time_zone_adjustment() 78 localtime_r (&now, &tm); in jerry_port_get_local_time_zone_adjustment() 81 now -= tm.tm_gmtoff; in jerry_port_get_local_time_zone_adjustment() 82 localtime_r (&now, &tm); in jerry_port_get_local_time_zone_adjustment()
|
/third_party/node/deps/npm/node_modules/semver/node_modules/lru-cache/ |
H A D | index.js | 145 e: hit.now + (hit.maxAge || 0) 159 const now = maxAge ? Date.now() : 0 178 item.now = now 188 const hit = new Entry(key, value, len, now, maxAge) 236 const now = Date.now() 245 const maxAge = expiresAt - now 270 node.value.now [all...] |
/third_party/ntfs-3g/include/ntfs-3g/ |
H A D | ntfstime.h | 114 struct timespec now; in ntfs_current_time() local 117 clock_gettime(CLOCK_REALTIME, &now); in ntfs_current_time() 122 now.tv_sec = microseconds.tv_sec; in ntfs_current_time() 123 now.tv_nsec = microseconds.tv_usec*1000; in ntfs_current_time() 125 now.tv_sec = time((time_t*)NULL); in ntfs_current_time() 126 now.tv_nsec = 0; in ntfs_current_time() 128 return (timespec2ntfs(now)); in ntfs_current_time()
|
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/rsn_supp/ |
H A D | pmksa_cache.c | 61 struct os_reltime now; in pmksa_cache_expire() local 65 os_get_reltime(&now); in pmksa_cache_expire() 66 while (entry && entry->expiration <= now.sec) { in pmksa_cache_expire() 109 struct os_reltime now; in pmksa_cache_set_expiration() local 115 os_get_reltime(&now); in pmksa_cache_set_expiration() 116 sec = pmksa->pmksa->expiration - now.sec; in pmksa_cache_set_expiration() 128 sec = entry->expiration - now.sec; in pmksa_cache_set_expiration() 143 sec = pmksa->pmksa->reauth_time - now.sec; in pmksa_cache_set_expiration() 179 struct os_reltime now; in pmksa_cache_add() local 200 os_get_reltime(&now); in pmksa_cache_add() 471 struct os_reltime now; pmksa_cache_get_opportunistic() local 591 struct os_reltime now; pmksa_cache_set_current() local 629 struct os_reltime now; pmksa_cache_list() local 719 struct os_reltime now; pmksa_cache_reconfig() local [all...] |
/third_party/ltp/testcases/open_posix_testsuite/stress/threads/pthread_create/ |
H A D | testfrmw.c | 50 struct tm *now; in output() local 55 now = localtime(&nw); in output() 56 if (now == NULL) in output() 59 printf("[%2.2d:%2.2d:%2.2d]\n", now->tm_hour, now->tm_min, in output() 60 now->tm_sec); in output()
|