/freebsd/crypto/heimdal/lib/krb5/ |
H A D | test_crypto.c | 41 struct timeval tv1, tv2; in time_encryption() local 76 gettimeofday(&tv2, NULL); in time_encryption() 78 timevalsub(&tv2, &tv1); in time_encryption() 82 (long)tv2.tv_sec, (long)tv2.tv_usec); in time_encryption() 97 struct timeval tv1, tv2; in time_s2k() local 121 gettimeofday(&tv2, NULL); in time_s2k() 123 timevalsub(&tv2, &tv1); in time_s2k() 126 etype_name, iterations, (long)tv2.tv_sec, (long)tv2.tv_usec); in time_s2k()
|
/freebsd/contrib/netbsd-tests/lib/librt/ |
H A D | t_sched.c | 219 struct timespec tv1, tv2; in ATF_TC_BODY() local 225 tv1.tv_sec = tv2.tv_sec = -1; in ATF_TC_BODY() 226 tv1.tv_nsec = tv2.tv_nsec = -1; in ATF_TC_BODY() 229 ATF_REQUIRE(sched_rr_get_interval(getpid(), &tv2) == 0); in ATF_TC_BODY() 232 ATF_REQUIRE(tv2.tv_sec != -1); in ATF_TC_BODY() 235 ATF_REQUIRE(tv2.tv_nsec != -1); in ATF_TC_BODY() 237 ATF_REQUIRE(tv1.tv_sec == tv2.tv_sec); in ATF_TC_BODY() 238 ATF_REQUIRE(tv1.tv_nsec == tv2.tv_nsec); in ATF_TC_BODY()
|
/freebsd/contrib/netbsd-tests/lib/libc/sys/ |
H A D | t_gettimeofday.c | 65 struct timeval tv1, tv2; in ATF_TC_BODY() local 71 (void)memset(&tv2, 0, sizeof(struct timeval)); in ATF_TC_BODY() 74 ATF_REQUIRE(gettimeofday(&tv2, NULL) == 0); in ATF_TC_BODY() 76 if (timercmp(&tv2, &tv1, <) != 0) in ATF_TC_BODY()
|
/freebsd/contrib/ntp/sntp/libevent/test/ |
H A D | regress.h | 122 #define test_timeval_diff_leq(tv1, tv2, diff, tolerance) \ argument 123 tt_int_op(labs(timeval_msec_diff((tv1), (tv2)) - diff), <=, tolerance) 125 #define test_timeval_diff_eq(tv1, tv2, diff) \ argument 126 test_timeval_diff_leq((tv1), (tv2), (diff), 50)
|
H A D | regress.c | 717 struct timeval tv, tv2, tv_exit, start; in test_persistent_active_timeout() local 732 tv2.tv_sec = 0; in test_persistent_active_timeout() 733 tv2.tv_usec = 100 * 1000; in test_persistent_active_timeout() 734 event_base_once(base, -1, EV_TIMEOUT, activate_cb, &ev, &tv2); in test_persistent_active_timeout() 2865 struct timeval tv, now, tv2; in test_event_pending() local 2889 tt_assert( event_pending(t, EV_TIMEOUT, &tv2)); in test_event_pending() 2891 tt_assert(evutil_timercmp(&tv2, &now, >)); in test_event_pending() 2893 test_timeval_diff_eq(&now, &tv2, 500); in test_event_pending() 3291 struct timeval tv1, tv2, tv3, now; in test_gettimeofday_cached() local 3305 tt_int_op(0, ==, event_base_gettimeofday_cached(base, &tv2)); in test_gettimeofday_cached() [all …]
|
H A D | regress_util.c | 1359 struct timeval tv1, tv2, tv3, diff1, diff2; in test_evutil_usleep() local 1366 evutil_gettimeofday(&tv2, NULL); in test_evutil_usleep() 1370 evutil_timersub(&tv2, &tv1, &diff1); in test_evutil_usleep() 1371 evutil_timersub(&tv3, &tv2, &diff2); in test_evutil_usleep()
|
/freebsd/contrib/libevent/test/ |
H A D | regress.h | 122 #define test_timeval_diff_leq(tv1, tv2, diff, tolerance) \ argument 123 tt_int_op(labs(timeval_msec_diff((tv1), (tv2)) - diff), <=, tolerance) 125 #define test_timeval_diff_eq(tv1, tv2, diff) \ argument 126 test_timeval_diff_leq((tv1), (tv2), (diff), 50)
|
H A D | regress.c | 717 struct timeval tv, tv2, tv_exit, start; in test_persistent_active_timeout() local 732 tv2.tv_sec = 0; in test_persistent_active_timeout() 733 tv2.tv_usec = 100 * 1000; in test_persistent_active_timeout() 734 event_base_once(base, -1, EV_TIMEOUT, activate_cb, &ev, &tv2); in test_persistent_active_timeout() 2865 struct timeval tv, now, tv2; in test_event_pending() local 2889 tt_assert( event_pending(t, EV_TIMEOUT, &tv2)); in test_event_pending() 2891 tt_assert(evutil_timercmp(&tv2, &now, >)); in test_event_pending() 2893 test_timeval_diff_eq(&now, &tv2, 500); in test_event_pending() 3291 struct timeval tv1, tv2, tv3, now; in test_gettimeofday_cached() local 3305 tt_int_op(0, ==, event_base_gettimeofday_cached(base, &tv2)); in test_gettimeofday_cached() [all …]
|
H A D | regress_util.c | 1359 struct timeval tv1, tv2, tv3, diff1, diff2; in test_evutil_usleep() local 1366 evutil_gettimeofday(&tv2, NULL); in test_evutil_usleep() 1370 evutil_timersub(&tv2, &tv1, &diff1); in test_evutil_usleep() 1371 evutil_timersub(&tv3, &tv2, &diff2); in test_evutil_usleep()
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/cmd/ |
H A D | xattrtest.c | 333 timeval_sub(struct timeval *delta, struct timeval *tv1, struct timeval *tv2) in timeval_sub() argument 336 tv1->tv_sec - tv2->tv_sec, in timeval_sub() 337 tv1->tv_usec - tv2->tv_usec); in timeval_sub() 341 timeval_sub_seconds(struct timeval *tv1, struct timeval *tv2) in timeval_sub_seconds() argument 345 timeval_sub(&delta, tv1, tv2); in timeval_sub_seconds()
|
/freebsd/sys/contrib/libsodium/test/default/ |
H A D | pwhash_scrypt.c | 117 tv2(void) in tv2() function 374 tv2(); in main()
|
H A D | pwhash_argon2i.c | 107 tv2(void) in tv2() function 402 tv2(); in main()
|
H A D | pwhash_argon2id.c | 107 tv2(void) in tv2() function 400 tv2(); in main()
|
/freebsd/usr.sbin/diskinfo/ |
H A D | diskinfo.c | 349 static struct timeval tv1, tv2; variable 368 gettimeofday(&tv2, NULL); in delta_t() 369 dt = (tv2.tv_usec - tv1.tv_usec) / 1e6; in delta_t() 370 dt += (tv2.tv_sec - tv1.tv_sec); in delta_t()
|
/freebsd/contrib/ntp/kernel/sys/ |
H A D | bsd_audioirig.h | 78 struct timeval tv1,tv2,tv3; /* time stamps (median filter) */ member
|
/freebsd/contrib/ntp/sntp/libevent/ |
H A D | evutil_time.c | 177 struct timeval tv2 = *tv; in evutil_usleep_() local 178 select(0, NULL, NULL, NULL, &tv2); in evutil_usleep_()
|
H A D | event.c | 1421 is_same_common_timeout(const struct timeval *tv1, const struct timeval *tv2) in is_same_common_timeout() argument 1424 (tv2->tv_usec & ~MICROSECONDS_MASK); in is_same_common_timeout()
|
/freebsd/contrib/libevent/ |
H A D | evutil_time.c | 177 struct timeval tv2 = *tv; in evutil_usleep_() local 178 select(0, NULL, NULL, NULL, &tv2); in evutil_usleep_()
|
H A D | event.c | 1421 is_same_common_timeout(const struct timeval *tv1, const struct timeval *tv2) in is_same_common_timeout() argument 1424 (tv2->tv_usec & ~MICROSECONDS_MASK); in is_same_common_timeout()
|
/freebsd/sys/kern/ |
H A D | kern_time.c | 122 struct timeval delta, tv1, tv2; in settime() 148 tv2 = *tv; in settime() 149 timevalsub(&tv2, &maxtime); in settime() 150 if (tv2.tv_sec < -1) { in settime() 121 struct timeval delta, tv1, tv2; settime() local
|