/freebsd/tools/test/stress2/misc/ |
H A D | sem_timedwait.sh | 97 struct timespec tm; 108 clock_gettime(CLOCK_REALTIME, &tm); 109 tm.tv_nsec += 1000; 110 if (tm.tv_nsec >= 1000000000L) { 111 tm.tv_nsec -= 1000000000L; 112 tm.tv_sec++; 119 } while (sem_timedwait(&sem, &tm) == -1);
|
/freebsd/contrib/tzcode/ |
H A D | localtime.c | 225 static struct tm tm; variable 1705 struct tm * 1738 struct tm * 1742 static struct tm tm; in localtime() local 1744 struct tm *p_tm = &tm; in localtime() 1765 struct tm * 1816 static struct tm tm; in gmtime() local 1818 struct tm *p_tm = &tm; in gmtime() 1862 static struct tm tm; in offtime() local 1864 struct tm *p_tm = &tm; in offtime() [all …]
|
H A D | strftime.c | 120 struct tm const *restrict t, in strftime_l() 130 struct tm const *restrict t) in strftime() 319 struct tm tm; in _fmt() local 324 tm.tm_sec = t->tm_sec; in _fmt() 325 tm.tm_min = t->tm_min; in _fmt() 326 tm.tm_hour = t->tm_hour; in _fmt() 327 tm.tm_mday = t->tm_mday; in _fmt() 328 tm.tm_mon = t->tm_mon; in _fmt() 329 tm.tm_year = t->tm_year; in _fmt() 333 tm.tm_isdst = t->tm_isdst; in _fmt() [all …]
|
/freebsd/contrib/openbsm/libauditd/ |
H A D | auditd_lib.c | 346 struct tm tm; in trailname_to_tstamp() local 361 bzero(&tm, sizeof(tm)); in trailname_to_tstamp() 365 tm.tm_sec = atol(p); in trailname_to_tstamp() 366 if (tm.tm_sec < 0 || tm.tm_sec > 60) in trailname_to_tstamp() 371 tm.tm_min = atol(p); in trailname_to_tstamp() 372 if (tm.tm_min < 0 || tm.tm_min > 59) in trailname_to_tstamp() 377 tm.tm_hour = atol(p); in trailname_to_tstamp() 378 if (tm.tm_hour < 0 || tm.tm_hour > 23) in trailname_to_tstamp() 384 if (tm.tm_mday < 1 || tm.tm_mday > 31) in trailname_to_tstamp() 390 if (tm.tm_mon < 0 || tm.tm_mon > 11) in trailname_to_tstamp() [all …]
|
/freebsd/crypto/heimdal/lib/asn1/ |
H A D | der_put.c | 501 struct tm tm; in _heim_time2generalizedtime() local 508 if (_der_gmtime(t, &tm) == NULL) in _heim_time2generalizedtime() 512 tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, in _heim_time2generalizedtime() 513 tm.tm_hour, tm.tm_min, tm.tm_sec); in _heim_time2generalizedtime() 516 tm.tm_year % 100, tm.tm_mon + 1, tm.tm_mday, in _heim_time2generalizedtime() 517 tm.tm_hour, tm.tm_min, tm.tm_sec); in _heim_time2generalizedtime()
|
/freebsd/usr.bin/calendar/ |
H A D | events.c | 201 struct tm tm; in event_print_all() local 213 memset(&tm, 0, sizeof(struct tm)); in event_print_all() 214 tm.tm_mday = e->day; in event_print_all() 215 tm.tm_mon = e->month - 1; in event_print_all() 216 tm.tm_year = e->year - 1900; in event_print_all() 217 (void)strftime(dbuf, sizeof(dbuf), d_first ? "%e %b" : "%b %e", &tm); in event_print_all()
|
/freebsd/contrib/llvm-project/libcxx/include/ |
H A D | ctime | 30 tm 35 time_t mktime(tm* timeptr); 37 char* asctime(const tm* timeptr); 39 tm* gmtime(const time_t* timer); 40 tm* localtime(const time_t* timer); 42 const tm* restrict timeptr); 68 using ::tm _LIBCPP_USING_IF_EXISTS;
|
/freebsd/contrib/unbound/compat/ |
H A D | gmtime_r.c | 48 struct tm * const tmp; 103 struct tm * gmtime_r(const time_t* timep, struct tm *tm) in gmtime_r() argument 105 timesub(timep, 0L, tm); in gmtime_r() 106 return tm; in gmtime_r()
|
/freebsd/libexec/bootpd/ |
H A D | tzone.c | 35 struct tm *tm; in tzone_init() 39 if ((tm = localtime(&now)) == NULL) { in tzone_init() 43 secondswest = -tm->tm_gmtoff; in tzone_init()
|
/freebsd/crypto/heimdal/lib/roken/ |
H A D | tm2time.c | 47 tm2time (struct tm tm, int local) in tm2time() argument 51 tm.tm_isdst = local ? -1 : 0; in tm2time() 53 t = mktime (&tm); in tm2time()
|
/freebsd/crypto/openssh/regress/ |
H A D | timestamp.c | 35 struct tm *tm; in main() local 40 if ((tm = localtime(&tv.tv_sec)) == NULL) in main() 42 if (strftime(buf, sizeof buf, "%Y%m%dT%H%M%S", tm) <= 0) in main()
|
/freebsd/contrib/wpa/src/utils/ |
H A D | os_unix.c | 142 struct tm tm, *tm1; in os_mktime() local 151 memset(&tm, 0, sizeof(tm)); in os_mktime() 153 tm.tm_mon = month - 1; in os_mktime() 154 tm.tm_mday = day; in os_mktime() 155 tm.tm_hour = hour; in os_mktime() 156 tm.tm_min = min; in os_mktime() 157 tm.tm_sec = sec; in os_mktime() 159 t_local = mktime(&tm); in os_mktime() 181 struct tm *tm2; in os_gmtime() 187 tm->sec = tm2->tm_sec; in os_gmtime() [all …]
|
/freebsd/contrib/nvi/common/ |
H A D | cut.c | 64 cut(SCR *sp, CHAR_T *namep, MARK *fm, MARK *tm, int flags) in cut() argument 97 (LF_ISSET(CUT_LINEMODE) || fm->lno != tm->lno))) { in cut() 108 (LF_ISSET(CUT_LINEMODE) || fm->lno != tm->lno))) { in cut() 135 for (lno = fm->lno; lno <= tm->lno; ++lno) in cut() 143 if (cut_line(sp, fm->lno, fm->cno, fm->lno != tm->lno ? in cut() 144 ENTIRE_LINE : (tm->cno - fm->cno) + 1, cbp)) in cut() 148 for (lno = fm->lno; ++lno < tm->lno;) in cut() 153 if (tm->lno != fm->lno && in cut() 154 cut_line(sp, lno, 0, tm->cno + 1, cbp)) in cut()
|
/freebsd/crypto/openssl/crypto/x509/ |
H A D | x509cset.c | 37 int X509_CRL_set1_lastUpdate(X509_CRL *x, const ASN1_TIME *tm) in X509_CRL_set1_lastUpdate() argument 41 return ossl_x509_set1_time(&x->crl.lastUpdate, tm); in X509_CRL_set1_lastUpdate() 44 int X509_CRL_set1_nextUpdate(X509_CRL *x, const ASN1_TIME *tm) in X509_CRL_set1_nextUpdate() argument 48 return ossl_x509_set1_time(&x->crl.nextUpdate, tm); in X509_CRL_set1_nextUpdate() 140 int X509_REVOKED_set_revocationDate(X509_REVOKED *x, ASN1_TIME *tm) in X509_REVOKED_set_revocationDate() argument 147 if (in != tm) { in X509_REVOKED_set_revocationDate() 148 in = ASN1_STRING_dup(tm); in X509_REVOKED_set_revocationDate()
|
/freebsd/usr.bin/last/ |
H A D | last.c | 223 struct tm *tm; in wtmp() local 249 tm = localtime(&t); in wtmp() 250 (void) strftime(ct, sizeof(ct), "%+", tm); in wtmp() 339 struct tm *tm; in printentry() local 347 tm = localtime(&t); in printentry() 350 (yflag ? "%a %b %e %Y %R" : "%a %b %e %R"), tm); in printentry() 381 tm = localtime(&tt->logout); in printentry() 382 (void) strftime(ct, sizeof(ct), "%R", tm); in printentry() 391 tm = gmtime(&delta); in printentry() 392 (void) strftime(ct, sizeof(ct), width >= 8 ? "%T" : "%R", tm); in printentry() [all …]
|
/freebsd/sys/sys/ |
H A D | efi.h | 256 struct efi_tm *tm); 257 int (*set_waketime)(uint8_t enable, struct efi_tm *tm); 291 static inline int efi_get_time(struct efi_tm *tm) in efi_get_time() argument 296 return (active_efi_ops->get_time(tm)); in efi_get_time() 315 static inline int efi_set_time(struct efi_tm *tm) in efi_set_time() argument 320 return (active_efi_ops->set_time(tm)); in efi_set_time() 324 struct efi_tm *tm) in efi_get_waketime() argument 328 return (active_efi_ops->get_waketime(enabled, pending, tm)); in efi_get_waketime() 331 static inline int efi_set_waketime(uint8_t enable, struct efi_tm *tm) in efi_set_waketime() argument 335 return (active_efi_ops->set_waketime(enable, tm)); in efi_set_waketime()
|
/freebsd/contrib/unbound/sldns/ |
H A D | parseutil.h | 17 struct tm; 55 time_t sldns_mktime_from_utc(const struct tm *tm); 71 struct tm * sldns_serial_arithmetics_gmtime_r(int32_t time, time_t now, struct tm *result);
|
H A D | parseutil.c | 72 sldns_mktime_from_utc(const struct tm *tm) in sldns_mktime_from_utc() argument 74 int year = 1900 + tm->tm_year; in sldns_mktime_from_utc() 81 for (i = 0; i < tm->tm_mon; ++i) { in sldns_mktime_from_utc() 84 if (tm->tm_mon > 1 && is_leap_year(year)) { in sldns_mktime_from_utc() 87 days += tm->tm_mday - 1; in sldns_mktime_from_utc() 89 hours = days * 24 + tm->tm_hour; in sldns_mktime_from_utc() 90 minutes = hours * 60 + tm->tm_min; in sldns_mktime_from_utc() 91 seconds = minutes * 60 + tm->tm_sec; in sldns_mktime_from_utc() 134 sldns_wday_from_year_and_yday(struct tm *result) in sldns_wday_from_year_and_yday() 146 static struct tm * [all …]
|
/freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/ |
H A D | sanitizer_platform_limits_solaris.cpp | 70 unsigned struct_tm_sz = sizeof(struct tm); 283 CHECK_TYPE_SIZE(tm); 284 CHECK_SIZE_AND_OFFSET(tm, tm_sec); 285 CHECK_SIZE_AND_OFFSET(tm, tm_min); 286 CHECK_SIZE_AND_OFFSET(tm, tm_hour); 287 CHECK_SIZE_AND_OFFSET(tm, tm_mday); 288 CHECK_SIZE_AND_OFFSET(tm, tm_mon); 289 CHECK_SIZE_AND_OFFSET(tm, tm_year); 290 CHECK_SIZE_AND_OFFSET(tm, tm_wday); 291 CHECK_SIZE_AND_OFFSET(tm, tm_yday); [all …]
|
/freebsd/bin/date/ |
H A D | vary.c | 54 static int adjhour(struct tm *, char, int64_t, int); 57 domktime(struct tm *t, char type) in domktime() 104 daysinmonth(const struct tm *t) in daysinmonth() 127 adjyear(struct tm *t, char type, int64_t val, int mk) in adjyear() 148 adjmon(struct tm *t, char type, int64_t val, int istext, int mk) in adjmon() 208 adjday(struct tm *t, char type, int64_t val, int mk) in adjday() 252 adjwday(struct tm *t, char type, int64_t val, int istext, int mk) in adjwday() 288 adjhour(struct tm *t, char type, int64_t val, int mk) in adjhour() 333 adjmin(struct tm *t, char type, int64_t val, int mk) in adjmin() 374 adjsec(struct tm *t, char type, int64_t val, int mk) in adjsec() [all …]
|
/freebsd/sys/contrib/openzfs/module/lua/ |
H A D | ldebug.c | 459 TMS tm; in getfuncname() local 477 case OP_EQ: tm = TM_EQ; break; in getfuncname() 478 case OP_ADD: tm = TM_ADD; break; in getfuncname() 479 case OP_SUB: tm = TM_SUB; break; in getfuncname() 480 case OP_MUL: tm = TM_MUL; break; in getfuncname() 481 case OP_DIV: tm = TM_DIV; break; in getfuncname() 482 case OP_MOD: tm = TM_MOD; break; in getfuncname() 483 case OP_POW: tm = TM_POW; break; in getfuncname() 486 case OP_LT: tm = TM_LT; break; in getfuncname() 487 case OP_LE: tm = TM_LE; break; in getfuncname() [all …]
|
/freebsd/crypto/heimdal/kadmin/ |
H A D | util.c | 180 struct tm tm, tm2; in str2time_t() local 182 memset (&tm, 0, sizeof (tm)); in str2time_t() 207 p = strptime (str, "%Y-%m-%d", &tm); in str2time_t() 218 tm.tm_hour = tm2.tm_hour; in str2time_t() 219 tm.tm_min = tm2.tm_min; in str2time_t() 220 tm.tm_sec = tm2.tm_sec; in str2time_t() 223 tm.tm_hour = 23; in str2time_t() 224 tm.tm_min = 59; in str2time_t() 225 tm.tm_sec = 59; in str2time_t() 228 *t = tm2time (tm, 0); in str2time_t()
|
/freebsd/crypto/openssl/doc/man3/ |
H A D | X509_get0_notBefore.pod | 20 int X509_set1_notBefore(X509 *x, const ASN1_TIME *tm); 21 int X509_set1_notAfter(X509 *x, const ASN1_TIME *tm); 26 int X509_CRL_set1_lastUpdate(X509_CRL *x, const ASN1_TIME *tm); 27 int X509_CRL_set1_nextUpdate(X509_CRL *x, const ASN1_TIME *tm); 42 and B<notAfter> fields of B<x> to B<tm>. Ownership of the passed 43 parameter B<tm> is not transferred by these functions so it must 53 and B<nextUpdate> fields of B<crl> to B<tm>. Ownership of the passed parameter 54 B<tm> is not transferred by these functions so it must be freed up after the
|
/freebsd/crypto/openssl/crypto/asn1/ |
H A D | asn1_local.h | 15 int ossl_asn1_time_to_tm(struct tm *tm, const ASN1_TIME *d); 16 int ossl_asn1_utctime_to_tm(struct tm *tm, const ASN1_UTCTIME *d); 91 ASN1_TIME *ossl_asn1_time_from_tm(ASN1_TIME *s, struct tm *ts, int type);
|
/freebsd/sys/kgssapi/krb5/ |
H A D | krb5_mech.c | 899 m_free(tm); in krb5_get_mic_old() 1094 m_free(tm); in krb5_verify_mic_old() 1108 tm->m_len = 8; in krb5_verify_mic_old() 1124 m_free(tm); in krb5_verify_mic_old() 1127 m_free(tm); in krb5_verify_mic_old() 1315 tm->m_next = m; in krb5_wrap_old() 1326 tm->m_len = p - (uint8_t *) tm->m_data; in krb5_wrap_old() 1330 krb5_checksum(kc->kc_checksumkey, 13, tm, tm->m_len - 8, in krb5_wrap_old() 1367 krb5_encrypt(kc->kc_tokenkey, tm, p - (uint8_t *) tm->m_data, in krb5_wrap_old() 1392 *mp = tm; in krb5_wrap_old() [all …]
|