Home
last modified time | relevance | path

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

12345678

/illumos-gate/usr/src/test/os-tests/tests/sockfs/
H A Dtimeouts.c154 struct timeval tv = { 0 }; in main() local
157 tv.tv_sec = t->sec; in main()
158 tv.tv_usec = t->usec; in main()
159 optlen = sizeof (tv); in main()
160 if (setsockopt(cfd, SOL_SOCKET, t->option, &tv, optlen) != 0) { in main()
166 bzero(&tv, sizeof (tv)); in main()
167 if (getsockopt(cfd, SOL_SOCKET, t->option, &tv, &optlen) != 0) { in main()
173 if (optlen != sizeof (tv)) { in main()
176 " vs. %zd", (long)optlen, sizeof (tv)); in main()
180 if (tv.tv_sec != t->sec) { in main()
[all …]
/illumos-gate/usr/src/uts/common/syscall/
H A Dlwp_info.c47 timestruc_t tv[2]; in lwp_info() local
57 hrt2ts(hrutime, &tv[0]); in lwp_info()
58 hrt2ts(hrstime, &tv[1]); in lwp_info()
61 if (copyout(tv, tvp, sizeof (tv))) in lwp_info()
66 if (TIMESPEC_OVERFLOW(&tv[0]) || in lwp_info()
67 TIMESPEC_OVERFLOW(&tv[1])) in lwp_info()
70 TIMESPEC_TO_TIMESPEC32(&tv32[0], &tv[0]); in lwp_info()
71 TIMESPEC_TO_TIMESPEC32(&tv32[1], &tv[1]); in lwp_info()
/illumos-gate/usr/src/contrib/ast/src/lib/libast/tm/
H A Dtvgettime.c30 tvgettime(Tv_t* tv) in tvgettime() argument
38 tv->tv_sec = s.tv_sec; in tvgettime()
39 tv->tv_nsec = s.tv_nsec; in tvgettime()
48 tv->tv_sec = v.tv_sec; in tvgettime()
49 tv->tv_nsec = v.tv_usec * 1000; in tvgettime()
56 if ((tv->tv_sec = time(NiL)) != s) in tvgettime()
58 s = tv->tv_sec; in tvgettime()
63 tv->tv_nsec = n; in tvgettime()
H A Dtvsettime.c31 tvsettime(const Tv_t* tv) in tvsettime() argument
38 s.tv_sec = tv->tv_sec; in tvsettime()
39 s.tv_nsec = tv->tv_nsec; in tvsettime()
48 v.tv_sec = tv->tv_sec; in tvsettime()
49 v.tv_usec = tv->tv_nsec / 1000; in tvsettime()
58 s = tv->tv_sec + (tv->tv_nsec != 0); in tvsettime()
H A Dtmxgettime.c40 Tv_t tv; in tmxgettime() local
42 tvgettime(&tv); in tmxgettime()
43 return tmxsns(tv.tv_sec, tv.tv_nsec); in tmxgettime()
H A Dtmxsettime.c40 Tv_t tv; in tmxsettime() local
42 tv.tv_sec = tmxsec(t); in tmxsettime()
43 tv.tv_nsec = tmxnsec(t); in tmxsettime()
44 return tvsettime(&tv); in tmxsettime()
H A Dtmsleep.c37 Tv_t tv; in tmsleep() local
39 tv.tv_sec = sec; in tmsleep()
40 tv.tv_nsec = nsec; in tmsleep()
41 return tvsleep(&tv, NiL); in tmsleep()
H A Dtmxsleep.c36 Tv_t tv; in tmxsleep() local
38 tv.tv_sec = tmxsec(t); in tmxsleep()
39 tv.tv_nsec = tmxnsec(t); in tmxsleep()
40 return tvsleep(&tv, NiL); in tmxsleep()
/illumos-gate/usr/src/uts/common/io/
H A Dvuid_queue.c41 static struct timeval32 tv_divide(struct timeval32 tv, int dividend);
42 static struct timeval32 tv_mult(struct timeval32 tv, int multiplier);
43 #define tv_to_usec(tv) (((tv).tv_sec * 1000000) + (tv).tv_usec) argument
320 tv_divide(struct timeval32 tv, int dividend) in tv_divide() argument
325 return (tv); in tv_divide()
326 usecs = tv_to_usec(tv); in tv_divide()
328 tv = usec_to_tv(usecs); in tv_divide()
329 return (tv); in tv_divide()
334 tv_mult(struct timeval32 tv, int multiplier) in tv_mult() argument
338 usecs = tv_to_usec(tv); in tv_mult()
[all …]
/illumos-gate/usr/src/boot/sys/sys/
H A 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; \
/illumos-gate/usr/src/uts/common/netinet/
H A Dtcp_timer.h105 #define TCPT_RANGESET(tv, value, tvmin, tvmax) { \ argument
106 (tv) = (value); \
107 if ((tv) < (tvmin)) \
108 (tv) = (tvmin); \
109 else if ((tv) > (tvmax)) \
110 (tv) = (tvmax); \
/illumos-gate/usr/src/contrib/ast/src/lib/libast/features/
H A Dtvlib30 struct timespec tv;
31 return clock_gettime(CLOCK_REALTIME, &tv) != 0;
38 static struct timespec tv;
42 return utimets(".", &tv) != 0;
52 struct timeval tv;
55 if (gettimeofday(&tv, (struct timezone*)0) < 0)
63 if (gettimeofday(&tv, (void*)0) < 0)
71 if (gettimeofday(&tv) < 0)
/illumos-gate/usr/src/cmd/ypcmd/
H A Dypserv_resolv.c71 struct timeval tv; in setup_resolv() local
150 tv.tv_sec = 3; tv.tv_usec = 0; in setup_resolv()
153 tv, &sock, YPMSGSZ, YPMSGSZ); in setup_resolv()
184 tv.tv_sec = 10; tv.tv_usec = 0; in setup_resolv()
186 xdr_void, 0, tv)) != RPC_SUCCESS) { in setup_resolv()
292 struct timeval tv; in resolv_req() local
383 tv.tv_sec = 10; tv.tv_usec = 0; in resolv_req()
386 (char *)&fwd_req6, xdr_void, 0, tv); in resolv_req()
389 (char *)&fwd_req4, xdr_void, 0, tv); in resolv_req()
413 (char *)&fwd_req6, xdr_void, 0, tv); in resolv_req()
[all …]
/illumos-gate/usr/src/uts/common/sys/
H A Dtime.h63 #define TIMEVAL32_TO_TIMEVAL(tv, tv32) { \ argument
64 (tv)->tv_sec = (time_t)(tv32)->tv_sec; \
65 (tv)->tv_usec = (tv32)->tv_usec; \
68 #define TIMEVAL_TO_TIMEVAL32(tv32, tv) { \ argument
69 (tv32)->tv_sec = (time32_t)(tv)->tv_sec; \
70 (tv32)->tv_usec = (int32_t)(tv)->tv_usec; \
76 #define TIMEVAL_OVERFLOW(tv) \ argument
77 ((tv)->tv_sec < TIME32_MIN || (tv)->tv_sec > TIME32_MAX)
419 #define TIMESPEC_TO_TIMEVAL(tv, ts) { \ argument
420 (tv)->tv_sec = (ts)->tv_sec; \
[all …]
/illumos-gate/usr/src/contrib/ast/src/lib/libast/string/
H A Dfmttv.c32 fmttv(const char* fmt, Tv_t* tv) in fmttv() argument
38 s = fmttime(fmt, (time_t)tv->tv_sec); in fmttv()
39 if (!tv->tv_nsec || tv->tv_nsec == TV_NSEC_IGNORE) in fmttv()
42 sfsprintf(t, n, "%s.%09lu", s, (unsigned long)tv->tv_nsec); in fmttv()
/illumos-gate/usr/src/lib/libc/i386/sys/
H A Dgettimeofday.c25 gettimeofday(struct timeval *tv, void *tz __unused) in gettimeofday() argument
34 if (tv == NULL) { in gettimeofday()
43 (void) __cp_clock_gettime_realtime(cp, (struct timespec *)tv); in gettimeofday()
46 (struct timespec *)tv); in gettimeofday()
49 tv->tv_usec /= 1000; in gettimeofday()
/illumos-gate/usr/src/cmd/refer/
H A Drefer6.c148 class(int nt, char *tv[]) in class() argument
150 if (hastype(nt, tv, 'J')) in class()
152 if (hastype(nt, tv, 'B')) in class()
154 if (hastype(nt, tv, 'R')) in class()
156 if (hastype(nt, tv, 'G')) in class()
158 if (hastype(nt, tv, 'I')) in class()
160 if (hastype(nt, tv, 'M')) in class()
166 hastype(int nt, char *tv[], char c) in hastype() argument
170 if (control(tv[i][0]) && tv[i][1] == c) in hastype()
/illumos-gate/usr/src/uts/common/gssapi/mechs/krb5/krb5/os/
H A Dc_ustime.c70 struct timeval tv; in get_time_now() local
75 tv.tv_sec = now.tv_sec; in get_time_now()
76 tv.tv_usec = now.tv_nsec / (NANOSEC / MICROSEC); in get_time_now()
78 if (gettimeofday(&tv, (struct timezone *)0) == -1) in get_time_now()
82 n->sec = tv.tv_sec; in get_time_now()
83 n->usec = tv.tv_usec; in get_time_now()
/illumos-gate/usr/src/test/libc-tests/tests/
H A Dutimes.c143 struct timeval tv[2]; in runtest() local
148 TIMESPEC_TO_TIMEVAL(&tv[0], &ts[0]); in runtest()
149 TIMESPEC_TO_TIMEVAL(&tv[1], &ts[1]); in runtest()
173 if (utimes(path, tv) == -1) in runtest()
184 if (utimes(lpath, tv) == -1) in runtest()
197 if (lutimes(path, tv) == -1) in runtest()
208 if (lutimes(lpath, tv) == -1) in runtest()
224 if (utimes(path, tv) == -1) in runtest()
240 if (futimes(fd, tv) == -1) in runtest()
254 if (futimesat(fd, NULL, tv) == -1) in runtest()
[all …]
/illumos-gate/usr/src/uts/common/os/
H A Dtimers.c86 uniqtime(struct timeval *tv) in uniqtime() argument
145 tv->tv_sec = sec; in uniqtime()
146 tv->tv_usec = usec; in uniqtime()
158 struct timeval tv; in uniqtime32() local
160 uniqtime(&tv); in uniqtime32()
161 TIMEVAL_TO_TIMEVAL32(tv32p, &tv); in uniqtime32()
741 itimerfix(struct timeval *tv, int minimum) in itimerfix() argument
743 if (tv->tv_sec < 0 || tv->tv_sec > 100000000 || in itimerfix()
744 tv->tv_usec < 0 || tv->tv_usec >= MICROSEC) in itimerfix()
746 if (tv->tv_sec == 0 && tv->tv_usec != 0 && tv->tv_usec < minimum) in itimerfix()
[all …]
/illumos-gate/usr/src/lib/libldap5/sources/ldap/common/
H A Dufn.c362 struct timeval tv; in ldap_ufn_search_s() local
364 tv.tv_sec = ld->ld_timelimit; in ldap_ufn_search_s()
368 ld->ld_timelimit ? (void *) &tv : NULL, in ldap_ufn_search_s()
450 struct timeval tv; in ldap_ufn_expand() local
468 tv.tv_sec = 0; in ldap_ufn_expand()
469 tv.tv_usec = 100000; /* 1/10 of a second */ in ldap_ufn_expand()
472 *err = ldap_result( ld, msgid, 1, &tv, &tmpres ); in ldap_ufn_expand()
528 struct timeval *tv; in ldap_ufn_timeout() local
530 tv = (struct timeval *)tvparam; in ldap_ufn_timeout()
532 if ( tv->tv_sec != 0 ) { in ldap_ufn_timeout()
[all …]
/illumos-gate/usr/src/lib/libresolv2/common/bsd/
H A Dwritev.c39 struct iovec *tv; in __writev() local
42 for (i = 0, tv = iov; i <= iovlen; tv++) { in __writev()
43 rcode = write(fd, tv->iov_base, tv->iov_len); in __writev()
/illumos-gate/usr/src/uts/common/cpr/
H A Dcpr_stat.c52 cpr_time_t tv; in cpr_stat_event_start() local
55 tv = *ctp; in cpr_stat_event_start()
58 cpr_tod_get(&tv); in cpr_stat_event_start()
72 cep->ce_sec.stime = cep->ce_sec.etime = tv.tv_sec; in cpr_stat_event_start()
74 cep->ce_msec.stime = cep->ce_msec.etime = tv.tv_nsec / 100000000; in cpr_stat_event_start()
83 cpr_time_t tv; in cpr_stat_event_end() local
86 tv = *ctp; in cpr_stat_event_end()
88 cpr_tod_get(&tv); in cpr_stat_event_end()
109 cep->ce_sec.etime = tv.tv_sec; in cpr_stat_event_end()
118 cep->ce_msec.etime = tv.tv_nsec / 100000000; in cpr_stat_event_end()
/illumos-gate/usr/src/contrib/ast/src/lib/libast/aso/
H A Dasorelax.c42 Tv_t tv;
44 tv.tv_sec = 0;
45 tv.tv_nsec = nsec;
46 return tvsleep(&tv, 0);
/illumos-gate/usr/src/cmd/auditreduce/
H A Dproc.c629 struct timeval tv; local
714 tv.tv_sec = (time_t)secs;
715 tv.tv_usec = (suseconds_t)msecs;
725 tv.tv_sec = (time_t)secs;
726 tv.tv_usec = (suseconds_t)msecs;
734 tv.tv_sec = 0;
736 tv.tv_sec = (time_t)secs;
739 tv.tv_usec = 0;
741 tv.tv_usec = (suseconds_t)msecs;
743 tv.tv_sec = (time_t)secs;
[all …]

12345678