Lines Matching refs:t
27 uint64_t t; /* Ticks since the epoch */ member
43 #define ossl_time2seconds(t) (ossl_time2ticks(t) / OSSL_TIME_SECOND) argument
45 #define ossl_time2ms(t) (ossl_time2ticks(t) / OSSL_TIME_MS) argument
47 #define ossl_time2us(t) (ossl_time2ticks(t) / OSSL_TIME_US) argument
62 r.t = ticks; in OSSL_SAFE_MATH_UNSIGNED()
68 uint64_t ossl_time2ticks(OSSL_TIME t) in ossl_time2ticks() argument
70 return t.t; in ossl_time2ticks()
92 struct timeval ossl_time_to_timeval(OSSL_TIME t) in ossl_time_to_timeval() argument
101 t.t = safe_add_time(t.t, OSSL_TIME_US - 1, &err); in ossl_time_to_timeval()
103 t = ossl_time_infinite(); in ossl_time_to_timeval()
106 tv.tv_sec = (long int)(t.t / OSSL_TIME_SECOND); in ossl_time_to_timeval()
108 tv.tv_sec = (time_t)(t.t / OSSL_TIME_SECOND); in ossl_time_to_timeval()
110 tv.tv_usec = (t.t % OSSL_TIME_SECOND) / OSSL_TIME_US; in ossl_time_to_timeval()
118 OSSL_TIME t; in ossl_time_from_timeval() local
124 t.t = tv.tv_sec * OSSL_TIME_SECOND + tv.tv_usec * OSSL_TIME_US; in ossl_time_from_timeval()
125 return t; in ossl_time_from_timeval()
130 time_t ossl_time_to_time_t(OSSL_TIME t) in ossl_time_to_time_t() argument
132 return (time_t)(t.t / OSSL_TIME_SECOND); in ossl_time_to_time_t()
137 OSSL_TIME ossl_time_from_time_t(time_t t) in ossl_time_from_time_t() argument
141 ot.t = t; in ossl_time_from_time_t()
142 ot.t *= OSSL_TIME_SECOND; in ossl_time_from_time_t()
150 if (a.t > b.t) in ossl_time_compare()
152 if (a.t < b.t) in ossl_time_compare()
159 int ossl_time_is_zero(OSSL_TIME t) in ossl_time_is_zero() argument
161 return ossl_time_compare(t, ossl_time_zero()) == 0; in ossl_time_is_zero()
166 int ossl_time_is_infinite(OSSL_TIME t) in ossl_time_is_infinite() argument
168 return ossl_time_compare(t, ossl_time_infinite()) == 0; in ossl_time_is_infinite()
177 r.t = safe_add_time(a.t, b.t, &err); in ossl_time_add()
187 r.t = safe_sub_time(a.t, b.t, &err); in ossl_time_subtract()
195 return a.t > b.t ? ossl_time_subtract(a, b) in ossl_time_abs_difference()
205 r.t = safe_mul_time(a.t, b, &err); in ossl_time_multiply()
215 r.t = safe_div_time(a.t, b, &err); in ossl_time_divide()
225 r.t = safe_muldiv_time(a.t, b, c, &err); in ossl_time_muldiv()
233 return a.t > b.t ? a : b; in ossl_time_max()
240 return a.t < b.t ? a : b; in ossl_time_min()