Lines Matching defs:now
612 coap_tick_t now;
614 coap_ticks(&now);
615 if (context->next_timeout == 0 || context->next_timeout > now + delay) {
619 context->next_timeout = now + delay;
1305 coap_io_prepare_epoll(coap_context_t *ctx, coap_tick_t now) {
1308 (void)now;
1318 timeout = coap_io_prepare_io(ctx, sockets, max_sockets, &num_sockets, now);
1320 ctx->next_timeout = timeout ? now + timeout : 0;
1326 coap_ticks(&now);
1327 if (ctx->next_timeout != 0 && ctx->next_timeout > now) {
1328 coap_tick_t rem_timeout = ctx->next_timeout - now;
1359 coap_tick_t now) {
1380 timeout = coap_check_async(ctx, now);
1386 while (nextpdu && now >= ctx->sendqueue_basetime &&
1387 nextpdu->t <= now - ctx->sendqueue_basetime) {
1392 nextpdu->t - (now - ctx->sendqueue_basetime) < timeout))
1393 timeout = nextpdu->t - (now - ctx->sendqueue_basetime);
1400 if (tls_timeout < now + COAP_TICKS_PER_SECOND / 10)
1401 tls_timeout = now + COAP_TICKS_PER_SECOND / 10;
1403 (int)((tls_timeout - now) * 1000 / COAP_TICKS_PER_SECOND));
1404 if (timeout == 0 || tls_timeout - now < timeout)
1405 timeout = tls_timeout - now;
1433 (s->last_rx_tx + session_timeout <= now ||
1440 s_timeout = (s->last_rx_tx + session_timeout) - now;
1449 coap_tick_t tls_timeout = coap_dtls_get_timeout(s, now);
1450 while (tls_timeout > 0 && tls_timeout <= now) {
1457 tls_timeout = coap_dtls_get_timeout(s, now);
1463 if (tls_timeout > 0 && (timeout == 0 || tls_timeout - now < timeout))
1464 timeout = tls_timeout - now;
1468 if (coap_block_check_lg_srcv_timeouts(s, now, &s_timeout)) {
1475 if (coap_block_check_lg_xmit_timeouts(s, now, &s_timeout)) {
1492 s_timeout = coap_block_check_q_block2_xmit(s, now);
1508 if (s->last_rx_tx + ctx->ping_timeout * COAP_TICKS_PER_SECOND <= now) {
1516 s->last_rx_tx = now;
1517 s->last_ping = now;
1519 s_timeout = (s->last_rx_tx + ctx->ping_timeout * COAP_TICKS_PER_SECOND) - now;
1528 s->csm_tx = now;
1529 } else if (s->csm_tx + ctx->csm_timeout * COAP_TICKS_PER_SECOND <= now) {
1536 s_timeout = (s->csm_tx + ctx->csm_timeout * COAP_TICKS_PER_SECOND) - now;
1547 coap_tick_t tls_timeout = coap_dtls_get_timeout(s, now);
1548 while (tls_timeout > 0 && tls_timeout <= now) {
1554 tls_timeout = coap_dtls_get_timeout(s, now);
1560 if (tls_timeout > 0 && (timeout == 0 || tls_timeout - now < timeout))
1561 timeout = tls_timeout - now;
1566 if (coap_block_check_lg_crcv_timeouts(s, now, &s_timeout)) {
1573 if (coap_block_check_lg_xmit_timeouts(s, now, &s_timeout)) {
1584 s_timeout = coap_block_check_q_block1_xmit(s, now);
1618 coap_tick_t before, now;
1722 coap_ticks(&now);
1723 coap_io_do_io(ctx, now);
1776 coap_ticks(&now);
1780 coap_check_async(ctx, now);
1781 coap_ticks(&now);
1784 return (int)(((now - before) * 1000) / COAP_TICKS_PER_SECOND);