Home
last modified time | relevance | path

Searched refs:tv (Results 1 – 25 of 473) sorted by relevance

12345678910>>...19

/freebsd-10-stable/tests/sys/kern/acct/
Dacct_test.c82 struct timeval tv; in ATF_TC_BODY() local
84 tv.tv_sec = 0; in ATF_TC_BODY()
85 tv.tv_usec = 0; in ATF_TC_BODY()
86 v.c = encode_timeval(tv); in ATF_TC_BODY()
113 struct timeval tv; in ATF_TC_BODY() local
115 tv.tv_sec = 1; in ATF_TC_BODY()
116 tv.tv_usec = 0; in ATF_TC_BODY()
117 v.c = encode_timeval(tv); in ATF_TC_BODY()
119 (float)tv.tv_sec * AHZ + tv.tv_usec, v); in ATF_TC_BODY()
130 struct timeval tv; in ATF_TC_BODY() local
[all …]
/freebsd-10-stable/contrib/ntp/lib/isc/unix/
Dstdtime.c41 fix_tv_usec(struct timeval *tv) { in fix_tv_usec() argument
44 if (tv->tv_usec < 0) { in fix_tv_usec()
47 tv->tv_sec -= 1; in fix_tv_usec()
48 tv->tv_usec += US_PER_S; in fix_tv_usec()
49 } while (tv->tv_usec < 0); in fix_tv_usec()
50 } else if (tv->tv_usec >= US_PER_S) { in fix_tv_usec()
53 tv->tv_sec += 1; in fix_tv_usec()
54 tv->tv_usec -= US_PER_S; in fix_tv_usec()
55 } while (tv->tv_usec >=US_PER_S); in fix_tv_usec()
67 struct timeval tv; in isc_stdtime_get() local
[all …]
Dtime.c62 fix_tv_usec(struct timeval *tv) { in fix_tv_usec() argument
65 if (tv->tv_usec < 0) { in fix_tv_usec()
68 tv->tv_sec -= 1; in fix_tv_usec()
69 tv->tv_usec += US_PER_S; in fix_tv_usec()
70 } while (tv->tv_usec < 0); in fix_tv_usec()
71 } else if (tv->tv_usec >= US_PER_S) { in fix_tv_usec()
74 tv->tv_sec += 1; in fix_tv_usec()
75 tv->tv_usec -= US_PER_S; in fix_tv_usec()
76 } while (tv->tv_usec >=US_PER_S); in fix_tv_usec()
147 struct timeval tv; in isc_time_now() local
[all …]
/freebsd-10-stable/tools/regression/poll/
Dpipeselect.c20 #define SETUP(fd, rfds, tv) do { \ argument
23 (tv).tv_sec = 0; \
24 (tv).tv_usec = 0; \
63 struct timeval tv; in child() local
76 SETUP(fd, rfds, tv); in child()
77 if (select(fd + 1, &rfds, NULL, NULL, &tv) < 0) in child()
107 SETUP(fd, rfds, tv); in child()
108 if (select(fd + 1, &rfds, NULL, NULL, &tv) < 0) in child()
116 SETUP(fd, rfds, tv); in child()
117 if (select(fd + 1, &rfds, NULL, NULL, &tv) < 0) in child()
[all …]
/freebsd-10-stable/contrib/gcc/
Dtimevar.c266 struct timevar_def *tv = &timevars[timevar]; in timevar_push_1() local
271 tv->used = 1; in timevar_push_1()
274 gcc_assert (!tv->standalone); in timevar_push_1()
299 context->timevar = tv; in timevar_push_1()
344 struct timevar_def *tv = &timevars[timevar]; in timevar_start() local
350 tv->used = 1; in timevar_start()
354 gcc_assert (!tv->standalone); in timevar_start()
355 tv->standalone = 1; in timevar_start()
357 get_time (&tv->start_time); in timevar_start()
366 struct timevar_def *tv = &timevars[timevar]; in timevar_stop() local
[all …]
Dtree-ssa-live.h580 type_var_num (type_var_p tv) in type_var_num() argument
582 return tpa_num_trees (tv); in type_var_num()
589 type_var (type_var_p tv, int i) in type_var() argument
591 return tpa_tree (tv, i); in type_var()
598 type_var_first_partition (type_var_p tv, int i) in type_var_first_partition() argument
600 return tpa_first_partition (tv, i); in type_var_first_partition()
607 type_var_next_partition (type_var_p tv, int i) in type_var_next_partition() argument
609 return tpa_next_partition (tv, i); in type_var_next_partition()
616 type_var_dump (FILE *f, type_var_p tv) in type_var_dump() argument
619 tpa_dump (f, tv); in type_var_dump()
[all …]
/freebsd-10-stable/tools/regression/priv/
Dpriv_vfs_utimes.c92 struct timeval tv[2]; in priv_vfs_utimes_froot() local
95 tv[0].tv_sec = 0; in priv_vfs_utimes_froot()
96 tv[0].tv_usec = 0; in priv_vfs_utimes_froot()
97 tv[1].tv_sec = 0; in priv_vfs_utimes_froot()
98 tv[1].tv_usec = 0; in priv_vfs_utimes_froot()
99 error = utimes(fpath, tv); in priv_vfs_utimes_froot()
135 struct timeval tv[2]; in priv_vfs_utimes_fowner() local
138 tv[0].tv_sec = 0; in priv_vfs_utimes_fowner()
139 tv[0].tv_usec = 0; in priv_vfs_utimes_fowner()
140 tv[1].tv_sec = 0; in priv_vfs_utimes_fowner()
[all …]
/freebsd-10-stable/sys/ofed/include/linux/
Dktime.h69 } tv; member
129 static inline ktime_t timeval_to_ktime(struct timeval tv) in timeval_to_ktime() argument
131 return ktime_set(tv.tv_sec, tv.tv_usec * NSEC_PER_USEC); in timeval_to_ktime()
163 return (ktime_t) { .tv = { .sec = secs, .nsec = nsecs } }; in ktime_set()
178 if (res.tv.nsec < 0) in ktime_sub()
179 res.tv.nsec += NSEC_PER_SEC; in ktime_sub()
204 if (res.tv.nsec >= NSEC_PER_SEC) in ktime_add()
236 return (ktime_t) { .tv = { .sec = (s32)ts.tv_sec, in timespec_to_ktime()
246 static inline ktime_t timeval_to_ktime(const struct timeval tv) in timeval_to_ktime() argument
248 return (ktime_t) { .tv = { .sec = (s32)tv.tv_sec, in timeval_to_ktime()
[all …]
/freebsd-10-stable/contrib/ntp/sntp/libevent/
Devutil_time.c62 evutil_gettimeofday(struct timeval *tv, struct timezone *tz) in evutil_gettimeofday() argument
83 if (tv == NULL) in evutil_gettimeofday()
93 tv->tv_sec = (long) (ft.ft_64 / UNITS_PER_SEC); in evutil_gettimeofday()
94 tv->tv_usec = (long) ((ft.ft_64 / UNITS_PER_USEC) % USEC_PER_SEC); in evutil_gettimeofday()
103 evutil_tv_to_msec_(const struct timeval *tv) in evutil_tv_to_msec_() argument
105 if (tv->tv_usec > 1000000 || tv->tv_sec > MAX_SECONDS_IN_MSEC_LONG) in evutil_tv_to_msec_()
108 return (tv->tv_sec * 1000) + ((tv->tv_usec + 999) / 1000); in evutil_tv_to_msec_()
116 evutil_usleep_(const struct timeval *tv) in evutil_usleep_() argument
118 if (!tv) in evutil_usleep_()
122 long msec = evutil_tv_to_msec_(tv); in evutil_usleep_()
[all …]
/freebsd-10-stable/lib/libc/sys/
Dfutimens.c43 struct timeval now, tv[2], *tvp; in futimens() local
71 tv[0].tv_sec = times[0].tv_sec; in futimens()
72 tv[0].tv_usec = times[0].tv_nsec / 1000; in futimens()
73 tv[1].tv_sec = times[1].tv_sec; in futimens()
74 tv[1].tv_usec = times[1].tv_nsec / 1000; in futimens()
75 tvp = tv; in futimens()
81 tv[0].tv_sec = sb.st_atim.tv_sec; in futimens()
82 tv[0].tv_usec = sb.st_atim.tv_nsec / 1000; in futimens()
85 tv[1].tv_sec = sb.st_mtim.tv_sec; in futimens()
86 tv[1].tv_usec = sb.st_mtim.tv_nsec / 1000; in futimens()
[all …]
Dutimensat.c43 struct timeval now, tv[2], *tvp; in utimensat() local
75 tv[0].tv_sec = times[0].tv_sec; in utimensat()
76 tv[0].tv_usec = times[0].tv_nsec / 1000; in utimensat()
77 tv[1].tv_sec = times[1].tv_sec; in utimensat()
78 tv[1].tv_usec = times[1].tv_nsec / 1000; in utimensat()
79 tvp = tv; in utimensat()
85 tv[0].tv_sec = sb.st_atim.tv_sec; in utimensat()
86 tv[0].tv_usec = sb.st_atim.tv_nsec / 1000; in utimensat()
89 tv[1].tv_sec = sb.st_mtim.tv_sec; in utimensat()
90 tv[1].tv_usec = sb.st_mtim.tv_nsec / 1000; in utimensat()
[all …]
/freebsd-10-stable/contrib/ntp/sntp/libevent/test/
Dtest-time.c63 struct timeval tv; in time_cb() local
71 tv.tv_sec = 0; in time_cb()
72 tv.tv_usec = rand_int(50000); in time_cb()
73 if (tv.tv_usec % 2 || called < NEVENT) in time_cb()
74 evtimer_add(ev[j], &tv); in time_cb()
84 struct timeval tv; in main() local
106 tv.tv_sec = 0; in main()
107 tv.tv_usec = rand_int(50000); in main()
108 evtimer_add(ev[i], &tv); in main()
Dregress_thread.c113 struct timeval tv; in basic_thread() local
114 evutil_timerclear(&tv); in basic_thread()
115 tv.tv_sec = 0; in basic_thread()
116 tv.tv_usec = 3000; in basic_thread()
121 assert(evtimer_add(&ev, &tv) == 0); in basic_thread()
149 struct timeval tv; in sigchld_cb() local
153 tv.tv_usec = 100000; in sigchld_cb()
154 tv.tv_sec = 0; in sigchld_cb()
155 event_base_loopexit(base, &tv); in sigchld_cb()
171 struct timeval tv; in thread_basic() local
[all …]
/freebsd-10-stable/contrib/pf/libevent/
Devent.c348 event_loopexit(struct timeval *tv) in event_loopexit() argument
351 current_base, tv)); in event_loopexit()
355 event_base_loopexit(struct event_base *event_base, struct timeval *tv) in event_base_loopexit() argument
358 event_base, tv)); in event_base_loopexit()
374 struct timeval tv; in event_base_loop() local
402 gettime(&tv); in event_base_loop()
403 if (timercmp(&tv, &base->event_tv, <)) { in event_base_loop()
407 timersub(&base->event_tv, &tv, &off); in event_base_loop()
410 base->event_tv = tv; in event_base_loop()
413 timeout_next(base, &tv); in event_base_loop()
[all …]
/freebsd-10-stable/contrib/xz/src/xz/
Dmytime.c38 struct timespec tv; in mytime_now() local
39 while (clock_gettime(clk_id, &tv)) in mytime_now()
42 return (uint64_t)(tv.tv_sec) * UINT64_C(1000) + tv.tv_nsec / 1000000; in mytime_now()
44 struct timeval tv; in mytime_now()
45 gettimeofday(&tv, NULL); in mytime_now()
46 return (uint64_t)(tv.tv_sec) * UINT64_C(1000) + tv.tv_usec / 1000; in mytime_now()
/freebsd-10-stable/crypto/heimdal/lib/krb5/
Dtime.c55 struct timeval tv; in krb5_set_real_time() local
57 gettimeofday(&tv, NULL); in krb5_set_real_time()
59 context->kdc_sec_offset = sec - tv.tv_sec; in krb5_set_real_time()
66 context->kdc_usec_offset = usec - tv.tv_usec; in krb5_set_real_time()
73 context->kdc_usec_offset = tv.tv_usec; in krb5_set_real_time()
99 struct timeval tv; in krb5_us_timeofday() local
101 gettimeofday (&tv, NULL); in krb5_us_timeofday()
103 *sec = tv.tv_sec + context->kdc_sec_offset; in krb5_us_timeofday()
104 *usec = tv.tv_usec; /* XXX */ in krb5_us_timeofday()
Dtest_time.c43 struct timeval tv; in check_set_time() local
47 gettimeofday(&tv, NULL); in check_set_time()
49 ret = krb5_set_real_time(context, tv.tv_sec + diff, tv.tv_usec); in check_set_time()
57 diff2 = abs(sec - tv.tv_sec); in check_set_time()
61 abs(sec - tv.tv_sec)); in check_set_time()
/freebsd-10-stable/contrib/netbsd-tests/lib/librumphijack/
Dh_client.c52 struct timeval tv; in main() local
56 tv.tv_sec = 0; in main()
57 tv.tv_usec = 1; in main()
64 rv = select(pipefd[0]+1, &rfds, NULL, NULL, &tv); in main()
75 struct timeval tv; in main() local
78 tv.tv_sec = 0; in main()
79 tv.tv_usec = 1; in main()
83 rv = select(100, &fds, &fds, &fds, &tv); in main()
89 rv = select(0, NULL, NULL, NULL, &tv); in main()
/freebsd-10-stable/contrib/ntp/sntp/libevent/include/event2/
Devent_compat.h198 #define timeout_add(ev, tv) event_add((ev), (tv)) argument
201 #define timeout_pending(ev, tv) event_pending((ev), EV_TIMEOUT, (tv)) argument
212 #define signal_add(ev, tv) event_add((ev), (tv)) argument
216 #define signal_pending(ev, tv) event_pending((ev), EV_SIGNAL, (tv)) argument
/freebsd-10-stable/sys/sys/
Dtimespec.h41 #define TIMEVAL_TO_TIMESPEC(tv, ts) \ argument
43 (ts)->tv_sec = (tv)->tv_sec; \
44 (ts)->tv_nsec = (tv)->tv_usec * 1000; \
46 #define TIMESPEC_TO_TIMEVAL(tv, ts) \ argument
48 (tv)->tv_sec = (ts)->tv_sec; \
49 (tv)->tv_usec = (ts)->tv_nsec / 1000; \
/freebsd-10-stable/lib/libc/gen/
Dutime.c45 struct timeval tv[2], *tvp; local
48 tv[0].tv_sec = times->actime;
49 tv[1].tv_sec = times->modtime;
50 tv[0].tv_usec = tv[1].tv_usec = 0;
51 tvp = tv;
/freebsd-10-stable/sys/dev/drm2/radeon/
Dradeon_legacy_tv.c396 WREG32(RADEON_TV_UV_ADR, tv_dac->tv.tv_uv_adr); in radeon_restore_tv_timing_tables()
397 h_table = radeon_get_htiming_tables_addr(tv_dac->tv.tv_uv_adr); in radeon_restore_tv_timing_tables()
398 v_table = radeon_get_vtiming_tables_addr(tv_dac->tv.tv_uv_adr); in radeon_restore_tv_timing_tables()
401 tmp = ((uint32_t)tv_dac->tv.h_code_timing[i] << 14) | ((uint32_t)tv_dac->tv.h_code_timing[i+1]); in radeon_restore_tv_timing_tables()
403 if (tv_dac->tv.h_code_timing[i] == 0 || tv_dac->tv.h_code_timing[i + 1] == 0) in radeon_restore_tv_timing_tables()
407 tmp = ((uint32_t)tv_dac->tv.v_code_timing[i+1] << 14) | ((uint32_t)tv_dac->tv.v_code_timing[i]); in radeon_restore_tv_timing_tables()
409 if (tv_dac->tv.v_code_timing[i] == 0 || tv_dac->tv.v_code_timing[i + 1] == 0) in radeon_restore_tv_timing_tables()
419 WREG32(RADEON_TV_FRESTART, tv_dac->tv.frestart); in radeon_legacy_write_tv_restarts()
420 WREG32(RADEON_TV_HRESTART, tv_dac->tv.hrestart); in radeon_legacy_write_tv_restarts()
421 WREG32(RADEON_TV_VRESTART, tv_dac->tv.vrestart); in radeon_legacy_write_tv_restarts()
[all …]
/freebsd-10-stable/sys/netipx/
Dspx_timer.h141 #define SPXT_RANGESET(tv, value, tvmin, tvmax) { \ argument
142 (tv) = (value); \
143 if ((tv) < (tvmin)) \
144 (tv) = (tvmin); \
145 else if ((tv) > (tvmax)) \
146 (tv) = (tvmax); \
/freebsd-10-stable/contrib/ntp/include/
Dtimevalops.h76 #define TVTOTS(tv, ts) \ argument
78 (ts)->l_ui = (u_long)(tv)->tv_sec; \
79 TVUTOTSF((tv)->tv_usec, (ts)->l_uf); \
82 #define sTVTOTS(tv, ts) \ argument
86 (ts)->l_ui = (tv)->tv_sec; \
87 usec = (tv)->tv_usec; \
88 if (((tv)->tv_sec < 0) || ((tv)->tv_usec < 0)) { \
103 #define TSTOTV(ts, tv) \ argument
105 (tv)->tv_sec = (ts)->l_ui; \
106 TSFTOTVU((ts)->l_uf, (tv)->tv_usec); \
[all …]
/freebsd-10-stable/lib/libc/yp/
Dyplib.c293 struct timeval tv; in _yp_dobind() local
468 tv.tv_sec = _yplib_timeout/2; in _yp_dobind()
469 tv.tv_usec = 0; in _yp_dobind()
472 (xdrproc_t)xdr_ypbind_resp, &ypbr, tv); in _yp_dobind()
524 tv.tv_sec = _yplib_timeout/2; in _yp_dobind()
525 tv.tv_usec = 0; in _yp_dobind()
528 YPPROG, YPVERS, tv, &ysd->dom_socket, 1280, 2304); in _yp_dobind()
564 tv.tv_sec = 1; in _yp_dobind()
565 tv.tv_usec = 0; in _yp_dobind()
566 clnt_control(ysd->dom_client, CLSET_RETRY_TIMEOUT, (char*)&tv); in _yp_dobind()
[all …]

12345678910>>...19