Home
last modified time | relevance | path

Searched refs:SHR_FP (Results 1 – 2 of 2) sorted by relevance

/third_party/libcoap/src/
Dcoap_time.c81 #define SHR_FP(val,frac) (((coap_tick_t)((val) + (1 << ((frac) - 1)))) >> (frac)) macro
96 tmp = SHR_FP(tv.tv_nsec * Q(FRAC, (COAP_TICKS_PER_SECOND/1000000000.0)), FRAC); in coap_ticks()
108 tmp = SHR_FP(tv.tv_usec * Q(FRAC, (COAP_TICKS_PER_SECOND/1000000.0)), FRAC); in coap_ticks()
133 #undef SHR_FP
Dcoap_net.c895 #define SHR_FP(val,frac) (((val) + (1 << ((frac) - 1))) >> (frac)) in coap_calc_timeout() macro
899 result = SHR_FP((ACK_RANDOM_FACTOR - FP1) * r, MAX_BITS); in coap_calc_timeout()
903 result = SHR_FP(((result + FP1) * ACK_TIMEOUT), FRAC_BITS); in coap_calc_timeout()
907 return SHR_FP((COAP_TICKS_PER_SECOND * result), FRAC_BITS); in coap_calc_timeout()
910 #undef SHR_FP in coap_calc_timeout()