/illumos-gate/usr/src/uts/common/syscall/ |
H A D | lwp_info.c | 47 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 D | tvgettime.c | 30 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 D | tvsettime.c | 31 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 D | tmxgettime.c | 40 Tv_t tv; in tmxgettime() local 42 tvgettime(&tv); in tmxgettime() 43 return tmxsns(tv.tv_sec, tv.tv_nsec); in tmxgettime()
|
H A D | tmxsettime.c | 40 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 D | tmsleep.c | 37 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 D | tmxsleep.c | 36 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 D | vuid_queue.c | 43 #define tv_to_usec(tv) (((tv).tv_sec * 1000000) + (tv).tv_usec) 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() 338 usecs = tv_to_usec(tv); in tv_mult() 340 tv = usec_to_tv(usecs); in tv_mult() 341 return (tv); in tv_mult() 347 struct timeval32 tv; in usec_to_tv() local 349 tv.tv_sec = usec / 1000000; in usec_to_tv() [all …]
|
/illumos-gate/usr/src/boot/sys/sys/ |
H A D | timespec.h | 41 #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 D | tcp_timer.h | 105 #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 D | tvlib | 30 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/contrib/ast/src/lib/libast/string/ |
H A D | fmttv.c | 32 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 D | gettimeofday.c | 25 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/ypcmd/ |
H A D | ypserv_resolv.c | 71 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 D | time.h | 63 #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; \ 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; \ 424 #define TIMEVAL_TO_TIMESPEC(tv, ts) { \ argument [all …]
|
/illumos-gate/usr/src/cmd/refer/ |
H A D | refer6.c | 148 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 D | c_ustime.c | 70 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 D | utimes.c | 143 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 D | timers.c | 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() 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() 747 tv->tv_usec = minimum; in itimerfix() 760 if (tv->tv_sec < 0 || tv->tv_nsec < 0 || tv->tv_nsec >= NANOSEC) in itimerspecfix() 880 hzto(struct timeval *tv) in hzto() argument [all …]
|
/illumos-gate/usr/src/lib/libldap5/sources/ldap/common/ |
H A D | ufn.c | 362 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() 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() 533 tv->tv_usec = tv->tv_sec * 1000000; /* sec => micro sec */ in ldap_ufn_timeout() 534 tv->tv_sec = 0; in ldap_ufn_timeout() [all …]
|
/illumos-gate/usr/src/lib/libresolv2/common/bsd/ |
H A D | writev.c | 39 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/contrib/ast/src/lib/libast/aso/ |
H A D | asorelax.c | 42 Tv_t tv; 44 tv.tv_sec = 0; 45 tv.tv_nsec = nsec; 46 return tvsleep(&tv, 0);
|
/illumos-gate/usr/src/uts/common/cpr/ |
H A D | cpr_stat.c | 52 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/cmd/auditreduce/ |
H A D | proc.c | 629 struct timeval tv; local 714 tv.tv_sec = (time_t)secs; 725 tv.tv_sec = (time_t)secs; 734 tv.tv_sec = 0; 736 tv.tv_sec = (time_t)secs; 739 tv.tv_usec = 0; 758 tv.tv_sec = 0; 760 tv.tv_sec = (time_t)secs; 763 tv.tv_usec = 0; 773 if (m_after > tv.tv_sec) [all …]
|
/illumos-gate/usr/src/cmd/fs.d/ufs/quota/ |
H A D | quota.c | 440 struct timeval tv; in warn() local 442 time(&(tv.tv_sec)); in warn() 443 tv.tv_usec = 0; in warn() 453 } else if (dqp->dqb_btimelimit > tv.tv_sec) { in warn() 519 struct timeval tv; in prquota() local 523 time(&(tv.tv_sec)); in prquota() 524 tv.tv_usec = 0; in prquota() 781 struct timeval tv; in getnfsquota() local 789 gettimeofday(&tv, NULL); in getnfsquota() 803 tv.tv_sec + rquota->rq_btimeleft; in getnfsquota() [all …]
|