Home
last modified time | relevance | path

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

/net-tools-latest/libcoap/src/
Dcoap_time.c46 #define SHR_FP(val,frac) (((val) + (1 << ((frac) - 1))) >> (frac)) macro
61 tmp = SHR_FP(tv.tv_nsec * Q(FRAC, (COAP_TICKS_PER_SECOND/1000000000.0)), FRAC); in coap_ticks()
73 tmp = SHR_FP(tv.tv_usec * Q(FRAC, (COAP_TICKS_PER_SECOND/1000000.0)), FRAC); in coap_ticks()
88 #undef SHR_FP
Dnet.c683 #define SHR_FP(val,frac) (((val) + (1 << ((frac) - 1))) >> (frac)) in calc_timeout() macro
687 result = SHR_FP((ACK_RANDOM_FACTOR - FP1) * r, MAX_BITS); in calc_timeout()
691 result = SHR_FP(((result + FP1) * ACK_TIMEOUT), FRAC_BITS); in calc_timeout()
695 return SHR_FP((COAP_TICKS_PER_SECOND * result), FRAC_BITS); in calc_timeout()
698 #undef SHR_FP in calc_timeout()