Lines Matching refs:timeleft
287 struct timeval *dtls1_get_timeout(SSL *s, struct timeval *timeleft) in dtls1_get_timeout() argument
303 memset(timeleft, 0, sizeof(*timeleft)); in dtls1_get_timeout()
304 return timeleft; in dtls1_get_timeout()
308 memcpy(timeleft, &(s->d1->next_timeout), sizeof(struct timeval)); in dtls1_get_timeout()
309 timeleft->tv_sec -= timenow.tv_sec; in dtls1_get_timeout()
310 timeleft->tv_usec -= timenow.tv_usec; in dtls1_get_timeout()
311 if (timeleft->tv_usec < 0) { in dtls1_get_timeout()
312 timeleft->tv_sec--; in dtls1_get_timeout()
313 timeleft->tv_usec += 1000000; in dtls1_get_timeout()
320 if (timeleft->tv_sec == 0 && timeleft->tv_usec < 15000) { in dtls1_get_timeout()
321 memset(timeleft, 0, sizeof(*timeleft)); in dtls1_get_timeout()
324 return timeleft; in dtls1_get_timeout()
329 struct timeval timeleft; in dtls1_is_timer_expired() local
332 if (dtls1_get_timeout(s, &timeleft) == NULL) { in dtls1_is_timer_expired()
337 if (timeleft.tv_sec > 0 || timeleft.tv_usec > 0) { in dtls1_is_timer_expired()