| /netbsd-src/external/bsd/libarchive/dist/libarchive/test/ |
| H A D | test_archive_getdate.c | 40 time_t now = time(NULL); in DEFINE_TEST() local 42 assertEqualInt(get_date(now, "Jan 1, 1970 UTC"), 0); in DEFINE_TEST() 43 assertEqualInt(get_date(now, "7:12:18-0530 4 May 1983"), 420900138); in DEFINE_TEST() 44 assertEqualInt(get_date(now, "2004/01/29 513 mest"), 1075345980); in DEFINE_TEST() 45 assertEqualInt(get_date(now, "99/02/17 7pm utc"), 919278000); in DEFINE_TEST() 46 assertEqualInt(get_date(now, "02/17/99 7:11am est"), 919253460); in DEFINE_TEST() 47 assertEqualInt(get_date(now, "now - 2 hours"), in DEFINE_TEST() 48 get_date(now, "2 hours ago")); in DEFINE_TEST() 49 assertEqualInt(get_date(now, "2 hours ago"), in DEFINE_TEST() 50 get_date(now, "+2 hours ago")); in DEFINE_TEST() [all …]
|
| /netbsd-src/external/ibm-public/postfix/dist/src/util/ |
| H A D | timecmp.c | 75 time_t now = time((time_t *) 0); in main() local 78 assert(timecmp(now + 10, now) > 0); in main() 79 assert(timecmp(now, now) == 0); in main() 80 assert(timecmp(now - 10, now) < 0); in main() 84 now = (time_t) -1; in main() 86 now = __MAXINT__(time_t); in main() 88 assert(timecmp(now + 10, now) > 0); in main() 89 assert(timecmp(now, now) == 0); in main() 90 assert(timecmp(now - 10, now) < 0); in main()
|
| H A D | sane_time.c | 65 time_t now; in sane_time() local 71 now = time((time_t *) 0); in sane_time() 73 if ((delta = now - last_time) < 0 && last_time != 0) { in sane_time() 74 if ((delta = now - last_real) < 0) { in sane_time() 88 last_time = now; in sane_time() 90 last_real = now; in sane_time() 110 time_t now; in main() local 120 now = time((time_t *) 0); in main() 121 vstream_printf("real: %s", ctime(&now)); in main() 122 now = sane_time(); in main() [all …]
|
| /netbsd-src/tests/lib/libutil/ |
| H A D | t_parsedate.c | 289 time_t now; in ATF_TC_BODY() local 291 #define REL_CHECK(s, now, tm) do { \ in ATF_TC_BODY() argument 294 p = parsedate(s, &now, NULL); \ in ATF_TC_BODY() 298 (uintmax_t)now, ctime_r(&now, nb), \ in ATF_TC_BODY() 319 for (now = 0x00FFFFFF; now < 0xFF000000; now += 3777779) { in ATF_TC_BODY() 320 ATF_CHECK(localtime_r(&now, &tm) != NULL); in ATF_TC_BODY() 324 REL_CHECK("yesterday", now, tm); in ATF_TC_BODY() 326 ATF_CHECK(localtime_r(&now, &tm) != NULL); in ATF_TC_BODY() 330 REL_CHECK("tomorrow", now, tm); in ATF_TC_BODY() 332 ATF_CHECK(localtime_r(&now, &tm) != NULL); in ATF_TC_BODY() [all …]
|
| /netbsd-src/sys/sys/ |
| H A D | syscall_stats.h | 73 uint32_t now = SYSCALL_TIME(); \ 74 SYSCALL_TIME_UPDATE_PROC(l, u, elapsed = now - (l)->l_syscall_time); \ 76 (l)->l_syscall_time = now; \ 81 uint32_t now = SYSCALL_TIME(); \ 82 uint32_t elapsed = now - (l)->l_syscall_time; \ 83 (l)->l_syscall_time = now; \ 94 uint32_t now = SYSCALL_TIME(); \ 95 uint32_t elapsed = now - (l)->l_syscall_time; \ 96 (l)->l_syscall_time = now; \ 105 uint32_t now = SYSCALL_TIME(); \ [all …]
|
| /netbsd-src/external/bsd/unbound/dist/services/cache/ |
| H A D | dns.c | 78 store_rrsets(struct module_env* env, struct reply_info* rep, time_t now, in store_rrsets() argument 90 LDNS_RR_TYPE_NS && !pside)?qstarttime:now + leeway))) { in store_rrsets() 101 rep->ref[i].key, region, now); in store_rrsets() 153 reply_info_set_ttls(rep, *env->now); in dns_cache_store_msg() 154 store_rrsets(env, rep, *env->now, leeway, pside, qrep, region, in dns_cache_store_msg() 189 uint16_t searchtype, uint16_t qclass, time_t now, uint8_t* expiretop, in rrset_expired_above() argument 208 if(now > data->ttl) { in rrset_expired_above() 229 uint16_t qclass, time_t now, uint16_t searchtype, int stripfront, in find_closest_of_type() argument 245 qnamelen, searchtype, qclass, 0, now, 0))) { in find_closest_of_type() 264 searchtype, qclass, now, expiretop, in find_closest_of_type() [all …]
|
| /netbsd-src/external/gpl3/binutils.old/dist/gold/ |
| H A D | timer.cc | 93 Timer::get_time(TimeStats *now) in get_time() argument 97 now->wall = (times(&t) * 1000) / ticks_per_sec; in get_time() 98 now->user = (t.tms_utime * 1000) / ticks_per_sec; in get_time() 99 now->sys = (t.tms_stime * 1000) / ticks_per_sec; in get_time() 101 now->wall = get_run_time() / 1000; in get_time() 102 now->user = 0; in get_time() 103 now->sys = 0; in get_time() 111 TimeStats now; in get_elapsed_time() local 112 this->get_time(&now); in get_elapsed_time() 114 delta.wall = now.wall - this->start_time_.wall; in get_elapsed_time() [all …]
|
| /netbsd-src/external/gpl3/binutils/dist/gold/ |
| H A D | timer.cc | 93 Timer::get_time(TimeStats *now) in get_time() argument 97 now->wall = (times(&t) * 1000) / ticks_per_sec; in get_time() 98 now->user = (t.tms_utime * 1000) / ticks_per_sec; in get_time() 99 now->sys = (t.tms_stime * 1000) / ticks_per_sec; in get_time() 101 now->wall = get_run_time() / 1000; in get_time() 102 now->user = 0; in get_time() 103 now->sys = 0; in get_time() 111 TimeStats now; in get_elapsed_time() local 112 this->get_time(&now); in get_elapsed_time() 114 delta.wall = now.wall - this->start_time_.wall; in get_elapsed_time() [all …]
|
| /netbsd-src/usr.sbin/rtadvd/ |
| H A D | timer.c | 102 struct timespec now; in rtadvd_set_timer() local 105 prog_clock_gettime(CLOCK_MONOTONIC, &now); in rtadvd_set_timer() 106 timespecadd(&now, tm, &timer->tm); in rtadvd_set_timer() 125 struct timespec now; in rtadvd_check_timer() local 128 prog_clock_gettime(CLOCK_MONOTONIC, &now); in rtadvd_check_timer() 134 if (timespeccmp(&tm->tm, &now, <=)) { in rtadvd_check_timer() 139 timespecadd(&tm->tm, &now, &tm->tm); in rtadvd_check_timer() 147 if (timespeccmp(&tm_max, &now, <)) { in rtadvd_check_timer() 151 timespecsub(&tm_max, &now, &returnval); in rtadvd_check_timer() 159 struct timespec now; in rtadvd_timer_rest() local [all …]
|
| /netbsd-src/external/gpl3/gcc/dist/gcc/ |
| H A D | timevar.cc | 215 get_time (struct timevar_time_def *now) in get_time() argument 217 now->user = 0; in get_time() 218 now->sys = 0; in get_time() 219 now->wall = 0; in get_time() 220 now->ggc_mem = timevar_ggc_mem_total; in get_time() 225 now->wall = times (&tms) * ticks_to_msec; in get_time() 226 now->user = tms.tms_utime * ticks_to_msec; in get_time() 227 now->sys = tms.tms_stime * ticks_to_msec; in get_time() 232 now->user = rusage.ru_utime.tv_sec + rusage.ru_utime.tv_usec * 1e-6; in get_time() 233 now->sys = rusage.ru_stime.tv_sec + rusage.ru_stime.tv_usec * 1e-6; in get_time() [all …]
|
| /netbsd-src/external/gpl3/gcc.old/dist/gcc/ |
| H A D | timevar.c | 217 get_time (struct timevar_time_def *now) in get_time() argument 219 now->user = 0; in get_time() 220 now->sys = 0; in get_time() 221 now->wall = 0; in get_time() 222 now->ggc_mem = timevar_ggc_mem_total; in get_time() 227 now->wall = times (&tms) * ticks_to_msec; in get_time() 228 now->user = tms.tms_utime * ticks_to_msec; in get_time() 229 now->sys = tms.tms_stime * ticks_to_msec; in get_time() 234 now->user = rusage.ru_utime.tv_sec + rusage.ru_utime.tv_usec * 1e-6; in get_time() 235 now->sys = rusage.ru_stime.tv_sec + rusage.ru_stime.tv_usec * 1e-6; in get_time() [all …]
|
| /netbsd-src/crypto/dist/ipsec-tools/src/racoon/ |
| H A D | schedule.c | 79 sched_monotonic_to_time_t(tv, now) in sched_monotonic_to_time_t() argument 80 struct timeval *tv, *now; in sched_monotonic_to_time_t() 85 if (now == NULL) { 87 now = &mynow; 89 timersub(now, tv, &res); 107 struct timeval now; in schedular() local 110 sched_get_monotonic_time(&now); in schedular() 112 timercmp(&TAILQ_FIRST(&sctree)->xtime, &now, <=)) { in schedular() 125 timersub(&p->xtime, &now, &timeout); in schedular() 141 struct timeval now; local [all …]
|
| H A D | throttle.c | 62 struct timeval now, penalty; local 72 sched_get_monotonic_time(&now); 75 timeradd(&now, &penalty, &te->penalty_ends); 89 struct timeval now, res; local 95 sched_get_monotonic_time(&now); 101 if (timercmp(&te->penalty_ends, &now, <)) { 134 timersub(&te->penalty_ends, &now, &remaining); 142 timeradd(&now, &res, &te->penalty_ends); 146 timersub(&te->penalty_ends, &now, &res);
|
| /netbsd-src/external/mpl/dhcp/bind/dist/lib/isc/unix/ |
| H A D | time.c | 360 time_t now; in isc_time_formattimestamp() local 369 now = (time_t)t->seconds; in isc_time_formattimestamp() 370 flen = strftime(buf, len, "%d-%b-%Y %X", localtime_r(&now, &tm)); in isc_time_formattimestamp() 382 time_t now; in isc_time_formathttptimestamp() local 395 now = (time_t)t->seconds; in isc_time_formathttptimestamp() 397 gmtime_r(&now, &tm)); in isc_time_formathttptimestamp() 424 time_t now; in isc_time_formatISO8601L() local 433 now = (time_t)t->seconds; in isc_time_formatISO8601L() 434 flen = strftime(buf, len, "%Y-%m-%dT%H:%M:%S", localtime_r(&now, &tm)); in isc_time_formatISO8601L() 440 time_t now; in isc_time_formatISO8601Lms() local [all …]
|
| /netbsd-src/external/mpl/bind/dist/tests/dns/ |
| H A D | zonemgr_test.c | 135 isc_time_t now; in ISC_RUN_TEST_IMPL() 139 now = isc_time_now(); in ISC_RUN_TEST_IMPL() 153 assert_false(dns_zonemgr_unreachable(myzonemgr, &addr1, &addr2, &now)); in ISC_RUN_TEST_IMPL() 158 dns_zonemgr_unreachableadd(myzonemgr, &addr1, &addr2, &now); in ISC_RUN_TEST_IMPL() 159 assert_false(dns_zonemgr_unreachable(myzonemgr, &addr1, &addr2, &now)); in ISC_RUN_TEST_IMPL() 160 dns_zonemgr_unreachableadd(myzonemgr, &addr1, &addr2, &now); in ISC_RUN_TEST_IMPL() 161 assert_true(dns_zonemgr_unreachable(myzonemgr, &addr1, &addr2, &now)); in ISC_RUN_TEST_IMPL() 165 assert_false(dns_zonemgr_unreachable(myzonemgr, &addr1, &addr2, &now)); in ISC_RUN_TEST_IMPL() 170 dns_zonemgr_unreachableadd(myzonemgr, &addr1, &addr2, &now); in ISC_RUN_TEST_IMPL() 171 dns_zonemgr_unreachableadd(myzonemgr, &addr1, &addr2, &now); in ISC_RUN_TEST_IMPL() 136 isc_time_t now; ISC_RUN_TEST_IMPL() local [all...] |
| /netbsd-src/tests/lib/libc/sys/ |
| H A D | t_timerfd.c | 210 struct timespec now; in ATF_TC_HEAD() 216 RL(clock_gettime(CLOCK_MONOTONIC, &now)); in ATF_TC_BODY() local 227 /* Try the same with an absolute time near now. */ in ATF_TC_BODY() 229 its.it_value.tv_sec += now.tv_sec + 60; in ATF_TC_BODY() 254 struct timespec then, now, delta; in ATF_TC_BODY() 273 RL(clock_gettime(CLOCK_MONOTONIC, &now)); in ATF_TC_BODY() 276 timespecsub(&now, &then, &delta); in ATF_TC_BODY() 278 "then=%jd.%09lu now=%jd.%09lu delta=%jd.%09lu", in ATF_TC_BODY() 280 (intmax_t)now.tv_sec, now in ATF_TC_BODY() 180 struct timespec then, now, delta; ATF_TC_BODY() local 255 struct timespec then, now, delta; ATF_TC_BODY() local 294 struct timespec now; ATF_TC_BODY() local 320 struct timespec now; timerfd_cancel_on_set_block_helper() local 492 struct timespec then, now; ATF_TC_BODY() local 585 struct timespec then, now, delta; ATF_TC_BODY() local [all...] |
| /netbsd-src/external/mpl/bind/dist/lib/isc/ |
| H A D | time.c | 327 time_t now; in isc_time_secondsastimet() 336 now = (time_t)t->seconds; in isc_time_secondsastimet() 337 flen = strftime(buf, len, "%d-%b-%Y %X", localtime_r(&now, &tm)); in isc_time_secondsastimet() 349 time_t now; in isc_time_secondsastimet() 362 now = (time_t)t->seconds; in isc_time_nanoseconds() 364 gmtime_r(&now, &tm)); in isc_time_nanoseconds() 391 time_t now; in isc_time_formathttptimestamp() 400 now = (time_t)t->seconds; in isc_time_formathttptimestamp() 401 flen = strftime(buf, len, "%Y-%m-%dT%H:%M:%S", localtime_r(&now, &tm)); in isc_time_formathttptimestamp() 407 time_t now; in isc_time_formathttptimestamp() 370 time_t now; isc_time_formattimestamp() local 392 time_t now; isc_time_formathttptimestamp() local 434 time_t now; isc_time_formatISO8601L() local 450 time_t now; isc_time_formatISO8601Lms() local 470 time_t now; isc_time_formatISO8601Lus() local 490 time_t now; isc_time_formatISO8601() local 506 time_t now; isc_time_formatISO8601ms() local 527 time_t now; isc_time_formatISO8601us() local 549 time_t now; isc_time_formatshorttimestamp() local [all...] |
| H A D | timer.c | 102 schedule(isc_timer_t * timer,isc_time_t * now,bool signal_ok) schedule() argument 253 isc_time_t now; isc_timer_create() local 361 isc_time_t now; isc_timer_reset() local 447 isc_time_t now; isc_timer_touch() local 527 dispatch(isc_timermgr_t * manager,isc_time_t * now) dispatch() argument 615 isc_time_t now; run() local
|
| /netbsd-src/external/mpl/bind/dist/lib/dns/ |
| H A D | keymgr.c | 207 * 1. If there is no active time set, which would be super weird, set it now. 208 * 2. If there is no published time set, also super weird, set it now. 209 * 3. If there is no syncpublished time set, set it now. 210 * 4. If the lifetime is not set, it will be set now. in keymgr_prepublication_time() 211 * 5. If there should be a retire time and it is not set, it will be set now. in keymgr_prepublication_time() argument 220 uint32_t lifetime, isc_stdtime_t now) { in keymgr_prepublication_time() 238 /* Super weird, but if it happens, set it to now. */ in keymgr_prepublication_time() 239 dst_key_settime(key->key, DST_TIME_ACTIVATE, now); in keymgr_prepublication_time() 240 active = now; in keymgr_prepublication_time() 244 /* Super weird, but if it happens, set it to now in keymgr_prepublication_time() 323 keymgr_key_retire(dns_dnsseckey_t * key,dns_kasp_t * kasp,isc_stdtime_t now) keymgr_key_retire() argument 1245 keymgr_transition_time(dns_dnsseckey_t * key,int type,dst_key_state_t next_state,dns_kasp_t * kasp,isc_stdtime_t now,isc_stdtime_t * when) keymgr_transition_time() argument 1412 keymgr_update(dns_dnsseckeylist_t * keyring,dns_kasp_t * kasp,isc_stdtime_t now,isc_stdtime_t * nexttime,bool secure_to_insecure) keymgr_update() argument 1566 keymgr_key_init(dns_dnsseckey_t * key,dns_kasp_t * kasp,isc_stdtime_t now,bool csk) keymgr_key_init() argument 1678 keymgr_key_rollover(dns_kasp_key_t * kaspkey,dns_dnsseckey_t * active_key,dns_dnsseckeylist_t * keyring,dns_dnsseckeylist_t * newkeys,const dns_name_t * origin,dns_rdataclass_t rdclass,dns_kasp_t * kasp,uint32_t lifetime,bool rollover,isc_stdtime_t now,isc_stdtime_t * nexttime,isc_mem_t * mctx) keymgr_key_rollover() argument 1891 keymgr_key_may_be_purged(dst_key_t * key,uint32_t after,isc_stdtime_t now) keymgr_key_may_be_purged() argument 1986 dns_keymgr_run(const dns_name_t * origin,dns_rdataclass_t rdclass,const char * directory,isc_mem_t * mctx,dns_dnsseckeylist_t * keyring,dns_dnsseckeylist_t * dnskeys,dns_kasp_t * kasp,isc_stdtime_t now,isc_stdtime_t * nexttime) dns_keymgr_run() argument 2258 keymgr_checkds(dns_kasp_t * kasp,dns_dnsseckeylist_t * keyring,const char * directory,isc_stdtime_t now,isc_stdtime_t when,bool dspublish,dns_keytag_t id,unsigned int alg,bool check_id) keymgr_checkds() argument 2350 dns_keymgr_checkds(dns_kasp_t * kasp,dns_dnsseckeylist_t * keyring,const char * directory,isc_stdtime_t now,isc_stdtime_t when,bool dspublish) dns_keymgr_checkds() argument 2358 dns_keymgr_checkds_id(dns_kasp_t * kasp,dns_dnsseckeylist_t * keyring,const char * directory,isc_stdtime_t now,isc_stdtime_t when,bool dspublish,dns_keytag_t id,unsigned int alg) dns_keymgr_checkds_id() argument 2366 keytime_status(dst_key_t * key,isc_stdtime_t now,isc_buffer_t * buf,const char * pre,int ks,int kt) keytime_status() argument 2391 rollover_status(dns_dnsseckey_t * dkey,dns_kasp_t * kasp,isc_stdtime_t now,isc_buffer_t * buf,bool zsk) rollover_status() argument 2497 dns_keymgr_status(dns_kasp_t * kasp,dns_dnsseckeylist_t * keyring,isc_stdtime_t now,char * out,size_t out_len) dns_keymgr_status() argument 2569 dns_keymgr_rollover(dns_kasp_t * kasp,dns_dnsseckeylist_t * keyring,const char * directory,isc_stdtime_t now,isc_stdtime_t when,dns_keytag_t id,unsigned int algorithm) dns_keymgr_rollover() argument [all...] |
| /netbsd-src/sys/arch/emips/stand/common/ |
| H A D | clock.c | 44 uint64_t now; in getsecs() local 53 now = Tc->FreeRunning; in getsecs() 56 now = now / 10*1000*1000; in getsecs() 59 now = now >> 23; in getsecs() 61 return (long) now; in getsecs()
|
| /netbsd-src/external/mpl/dhcp/bind/dist/lib/dns/ |
| H A D | keymgr.c | 196 uint32_t lifetime, isc_stdtime_t now) { in keymgr_prepublication_time() argument 215 dst_key_settime(key->key, DST_TIME_ACTIVATE, now); in keymgr_prepublication_time() 216 active = now; in keymgr_prepublication_time() 221 dst_key_settime(key->key, DST_TIME_PUBLISH, now); in keymgr_prepublication_time() 222 pub = now; in keymgr_prepublication_time() 300 return (now); in keymgr_prepublication_time() 306 keymgr_key_retire(dns_dnsseckey_t *key, dns_kasp_t *kasp, isc_stdtime_t now) { in keymgr_key_retire() argument 318 if (ret != ISC_R_SUCCESS || (retire > now)) { in keymgr_key_retire() 319 dst_key_settime(key->key, DST_TIME_INACTIVE, now); in keymgr_key_retire() 329 dst_key_settime(key->key, DST_TIME_DNSKEY, now); in keymgr_key_retire() [all …]
|
| /netbsd-src/external/bsd/unbound/dist/testcode/ |
| H A D | fake_event.c | 196 if(!runtime->now || runtime->now->evt_type != repevt_back_query in pending_matches_current() 201 if(runtime->now->addrlen != 0 && in pending_matches_current() 202 sockaddr_cmp(&p->addr, p->addrlen, &runtime->now->addr, in pending_matches_current() 203 runtime->now->addrlen) != 0) in pending_matches_current() 205 if((e=find_match(runtime->now->match, p->pkt, p->pkt_len, in pending_matches_current() 226 int timenow = runtime->now->time_step; in pending_find_match() 397 log_assert(runtime && runtime->now && in answer_check_it() 398 runtime->now->evt_type == repevt_front_reply); in answer_check_it() 403 if((runtime->now->addrlen == 0 || sockaddr_cmp( in answer_check_it() 404 &runtime->now->addr, runtime->now->addrlen, in answer_check_it() [all …]
|
| /netbsd-src/sys/arch/acorn32/doc/ |
| H A D | history | 9 - page up/down, insert and delete now generate the correct codes in 11 - the configured modesare now compiled in a separate file rather 30 - the kbd driver now is capable of setting the keyboard leds. 38 - Debugged the plip driver. The ip packet is now word aligned when 49 - Lark A16 podule now recognised 50 - section permission faults now cause bus errors 51 - the syscall handler now correctly uses bcopy to copy the register 53 - the copyin() function now validates the uaddrs argumant 56 - the assembly bcopyinout() now returns EFAULT on error 57 - the copyin() copyout() copyinstr() copyoutstr() now retur [all...] |
| /netbsd-src/sys/external/isc/libsodium/dist/ |
| H A D | ChangeLog | 3 - Signatures computations and verifications are now way faster on 12 `crypto_sign_edwards25519sha512batch_open` now reject public keys in 16 - Webassembly: `crypto_pwhash_*()` functions are now included in 21 - The Salsa20-based PRNG example is now thread-safe on platforms with 28 - The default password hashing algorithm is now Argon2id. The 39 module now returns a `.ready` promise that will resolve after the 45 - iOS binaries should now be compatible with WatchOS and TVOS. 46 - WebAssembly is now officially supported. Special thanks to 62 - crypto_sign_ed25519_pk_to_curve25519() now rejects points that are 66 - Visual Studio solutions are now included in distribution tarballs. [all …]
|
| /netbsd-src/external/mpl/dhcp/bind/dist/lib/isc/ |
| H A D | timer.c | 104 schedule(isc_timer_t *timer, isc_time_t *now, bool signal_ok) { in schedule() argument 121 isc_result_t result = isc_time_add(now, &timer->interval, &due); in schedule() 256 isc_time_t now; in isc_timer_create() local 281 TIME_NOW(&now); in isc_timer_create() 288 isc_time_settoepoch(&now); in isc_timer_create() 296 result = isc_time_add(&now, interval, &timer->idle); in isc_timer_create() 338 result = schedule(timer, &now, true); in isc_timer_create() 364 isc_time_t now; in isc_timer_reset() local 393 TIME_NOW(&now); in isc_timer_reset() 400 isc_time_settoepoch(&now); in isc_timer_reset() [all …]
|